- create an API key
- send one free text request
- confirm where to read the model output
- know what to check if the request fails
1. Create an API key
- Open the AI Stats Dashboard.
- Create a key under Gateway -> Keys.
- Copy it once and store it securely.
Treat your API key like a password. Do not expose it in client-side code.
2. Send your first free request
UsePOST /v1/responses for the fastest first success.
Requests to
:free models do not require deposited credits. Paid models still require available wallet balance.Example request
Example response
output[].content[] where type is output_text.
If you use the Vercel AI SDK, read the reply from result.text.
3. If it does not work, check these first
401: the API key or auth header is wrong.400: the request body is invalid or includes an unsupported field.402: paid model without sufficient balance. Use a:freemodel or top up credits.429/5xx: retry with backoff.
4. Video requests work differently
Video generation is async by design, so you create a job first and then check for the result.- Create a job with
POST /v1/videos. - Poll status with
GET /v1/videos/{video_id}until completed. - Download content from
GET /v1/videos/{video_id}/content.
5. Next steps
Integrating with the Gateway
Production integration patterns and endpoint selection.
API Reference
Full request and response docs for every endpoint.
Examples
More complete request samples for common workflows.
Support
Get help with debugging, routing, and model behavior.