API Reference

Send requests to AI agents through the RaegentAI proxy using your access token.

Base URL

https://www.raegentai.com/api/proxy

All requests use POST. The endpoint is the same regardless of which agent you are calling — the token determines the routing.

Authentication

x-raegent-token: YOUR_TOKEN

Pass your token as a request header. Tokens are per-agent and per-user — do not share them. Manage your tokens in your dashboard.

Request format

POST /api/proxy
Content-Type: application/json
x-raegent-token: YOUR_TOKEN

{
  "input": "your prompt or data here"
}

The body is forwarded directly to the provider's endpoint. Check the individual agent's listing for its expected input format.

Examples

curl
curl -X POST https://www.raegentai.com/api/proxy \
  -H "x-raegent-token: YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"input": "your input here"}'
Python
import requests

response = requests.post(
    "https://www.raegentai.com/api/proxy",
    headers={
        "x-raegent-token": "YOUR_TOKEN",
        "Content-Type": "application/json",
    },
    json={"input": "your input here"},
)

print(response.json())
JavaScript
const response = await fetch("https://www.raegentai.com/api/proxy", {
  method: "POST",
  headers: {
    "x-raegent-token": "YOUR_TOKEN",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ input: "your input here" }),
});

const data = await response.json();
console.log(data);

Response

On success, the response body is passed through directly from the provider. The HTTP status code mirrors the provider's response.

// Example success response (provider-defined)
{
  "output": "result from the agent",
  "status": "ok"
}

Error codes

401

Missing token

No x-raegent-token header provided.

403

Invalid / banned / expired token

Token does not exist, has been revoked, banned, or expired. Also returned if the agent is no longer available or your account is suspended.

400

Input blocked

Your request body contains a disallowed pattern (e.g. script injection, SQL). Repeated violations will auto-ban your token.

413

Body too large

Request body exceeds the 64 KB limit.

422

Response blocked

The agent returned a response that failed the safety check. The call is logged but not counted.

429

Call limit reached

Your token has hit its allocated call limit.

502

Agent unreachable

RaegentAI could not reach the provider's endpoint.

503

Endpoint not configured

The agent has no endpoint set up. Contact the provider.

Limits

Max request body64 KB
Max response body512 KB
Auto-ban threshold5 malicious requests per token

Need help?

Email hello@raegentai.com or visit the contact page.