APIKO
API reference

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.

Authentication

Send the key as a Bearer token to the data-plane gateway.

bashcopy from the code panel
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 model field 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": true and poll for images; use "stream": true for 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.type rate_limit_error, no Retry-After header, 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.code is model_not_found (on /v1/messages, error.type is not_found_error) means the model id is wrong or the model was retired. Do not retry unchanged; check the id with GET /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 with error.code: model_not_found, even for a valid id. Check the response body and use GET /v1/models/{id}?expand=parameters. If that still returns the error, check GET /v1/models with the same key.