First Request
Make your first ReddGrow API request in 3 ways
The fastest way to verify your API key and check your account status is to call the /agent/me endpoint. It returns your credit balance and confirms authentication is working.
Option 1 — curl
curl -H "x-api-key: rg_your_api_key_here" https://api.reddgrow.ai/agent/meReplace rg_your_api_key_here with your actual key.
Option 2 — CLI
If you have authenticated with reddgrow auth login, run:
reddgrow auth whoamiThe CLI formats the response for readability and uses the stored key automatically.
Option 3 — Node.js
const response = await fetch("https://api.reddgrow.ai/agent/me", {
headers: {
"x-api-key": process.env.REDDGROW_API_KEY,
},
});
const data = await response.json();
console.log(data);This uses the native fetch API available in Node.js 18+. No extra dependencies required.
Example response
A successful request returns HTTP 200 with a JSON body:
{
"ok": true,
"credits": {
"used": 1,
"remaining": 999,
"limit": 1000
}
}| Field | Description |
|---|---|
ok | true when the request succeeded |
credits.used | Credits consumed by this request |
credits.remaining | Credits left in the current billing period |
credits.limit | Total credits available on your current plan |
Error responses
| Status | Meaning |
|---|---|
401 Unauthorized | Key is missing, malformed, or revoked |
429 Too Many Requests | Credit limit reached for this billing period |
500 Internal Server Error | Unexpected server-side error |
If you receive a 401, double-check that the x-api-key header value starts with rg_ and matches the key shown in your dashboard.
Next steps
- Credits — understand how credits are consumed per endpoint
- API Reference — explore all available endpoints