One gateway for chat, images, videos, and model discovery.
Use the endpoint that matches the capability and send only the fields listed on the model page. Image models check requests against their published parameter schema and reject invalid values before charging. Text models may ignore unsupported fields or out-of-range values: the request still runs and is charged.
Chat completions
OpenAI-compatible JSON and SSE streaming.
Images
Create or edit images; async mode is recommended for long jobs.
Videos
Create a video task, poll its status, then download the result.
Text models
Browse model-family pages with copy-ready chat examples.
Models
Discover the public model ids; add ?expand=parameters for each model's parameter schema.
Claude Messages
Anthropic-compatible Messages API for Claude models.
GPT Responses
OpenAI Responses API, used by Codex CLI.
Image editing
Edit with public HTTPS reference images.
Task status
Poll image tasks created with "async": true.
Authentication
Send the key as a Bearer token to the data-plane gateway.
curl https://api.apiko.app/v1/models \
-H "Authorization: Bearer $APIKO_API_KEY"Protocol boundaries
This public APIKO documentation covers the endpoints implemented and verified by the current control-plane integration.
- Do not send image fields to Chat; use the image route.
- Do not assume every provider protocol is available through the public contract.
- Files, fine-tunes, realtime, and provider-native paths other than those listed above and on the model pages are not part of the APIKO contract.
- The
modelfield in a response is the name the model provider reports, often a dated or versioned id, so it can differ from the id you sent. Pricing and usage logs always use the model id in your request.
Concurrency, timeouts, and retries
- The edge proxy can return HTTP 524 if a non-streaming request has no response for about 100 seconds. A proxy timeout or client disconnect does not prove the request was canceled: it may still complete and be billed. Check your usage or task logs before resubmitting. Use
"async": trueand poll for images; use"stream": truefor long text output. - Rate limit: each account can send up to 500 requests per minute, counted across all of its API keys and models. Failed requests count too. A burst of up to 500 requests is accepted at once; after that, capacity refills at about 8 requests per second. Over the limit, the gateway returns HTTP 429 with
error.typerate_limit_error, noRetry-Afterheader, and a message that names your limit. A 429 is not billed. If you need a higher limit, tell us your expected peak requests per minute in live chat. - For 429 and 503, retry with exponential backoff and random jitter, starting at about 1 second. Do not retry 400, 401, or 403. If the response includes
Retry-After, wait for its value. The upstream provider can also return 429; handle it the same way. - On inference requests, a 404 whose
error.codeismodel_not_found(on/v1/messages,error.typeisnot_found_error) means the model id is wrong or the model was retired. Do not retry unchanged; check the id withGET /v1/models. The same message on a 503 means the model exists but has no route available right now; retry with backoff. GET /v1/models/{id}can return HTTP 200 witherror.code: model_not_found, even for a valid id. Check the response body and useGET /v1/models/{id}?expand=parameters. If that still returns the error, checkGET /v1/modelswith the same key.