Api.Airforce
TROUBLESHOOTING

Before You Report a Bug

Most "bugs" are configuration issues you can fix in 60 seconds — run through this checklist first.

If something doesn't work, the fastest way to find out whether it's on your side or ours is to run the same request from a different tool.

About 9 out of 10 "API broken" reports turn out to be a misconfigured base URL, a stale API key, a wrong model name, or a request body shape from a tutorial that's three SDK versions out of date.

Quick Self-Test

Copy this curl command into a terminal. Replace YOUR_KEY with your API key from the dashboard and run it. If you get a normal completion back, your API key, network, and our backend are all healthy — anything wrong is in your client code or environment.

cURL

curl https://api.airforce/v1/chat/completions \
  -H "Authorization: Bearer sk-air-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4.1-mini",
    "messages": [{"role": "user", "content": "ping"}]
  }'
No terminal handy? Paste the same model + prompt into the Playground from the dashboard — same effect, no setup.

Step-by-step Checklist

1

Is your API key valid?

Open Dashboard → API Keys and confirm the key matches what your code uses. A common trap is whitespace before the "sk-air-" prefix from copy-paste.

Symptom: 401 Unauthorized.

2

Is the base URL correct?

The base URL must be https://api.airforce/v1 — not http, and the /v1 suffix is required. Tutorials that pre-date OpenAI's v1 path sometimes omit it.

Symptom: 404 Not Found, or curl hangs.

3

Is the model name spelled correctly?

Model IDs are case-sensitive. Visit the Models page or call GET /v1/models to confirm the exact ID. A typo or a model that has been deprecated returns a clean error rather than "working but wrong".

Symptom: 400 unknown_model or 404 model_not_found.

4

Is the request body shaped correctly?

Chat completions use a messages array. Images use prompt + n. Audio TTS uses input + voice. Sending a chat-shaped body to /v1/images/generations returns 400 — easy to miss when copying snippets between docs.

Symptom: 400 with the offending field named in the response body.

5

Have you hit a rate limit or quota cap?

429 = too many requests this minute. 402 = your plan or balance is exhausted. Both show on the Dashboard. Free-tier requests have separate caps from paid-plan requests, so a paid model may answer fine while a free one rate-limits.

Symptom: 429 Too Many Requests or 402 Payment Required.

6

Is the model actually up right now?

Check the Models page — provider outages show as "degraded" or "major outage". If one model is down while others work, it's a provider-side issue we route around, not a client error.

Symptom: a specific model returns 5xx while others work.

What HTTP Status Codes Mean

Every error response carries a standard HTTP status code. Knowing what each one tells you saves a ticket.

400Your sideBad Request — malformed JSON, missing required field, unknown parameter. Fix the request body.
401Your sideUnauthorized — missing or invalid API key. Check the Authorization header includes the "Bearer " prefix.
402Your sidePayment Required — plan exhausted or Pay-as-you-go balance empty. Subscribe or top up.
403Your sideForbidden — your plan or per-key permission doesn't allow this model or endpoint.
404Your sideNot Found — unknown endpoint or model ID. Check the URL path and model spelling.
413Your sidePayload Too Large — input exceeds the model's context window. Shorten the prompt.
429Your sideToo Many Requests — rate-limited (RPM, RPD, or daily token cap). Slow down or upgrade.
500Our sideInternal Server Error — a bug on our side. Report it if it persists more than a minute.
502Our sideBad Gateway — backend mid-restart (we deploy a few times a day). Wait 5–10 seconds and retry.
503Our sideService Unavailable — every upstream provider for that model failed at once. Report if it lasts more than a few minutes.

Rule of Thumb

4xx codes mean your client did something the server rejected. 5xx codes mean we failed to handle a valid request. The JSON error body in the response usually names the field that tripped the check.

When It's Actually a Bug

If the curl self-test above works but the exact same request from your code does not, the problem is in your client (or the library it uses). If the self-test itself fails with a 5xx, or returns a 4xx with a message that doesn't match what your request looks like, that's worth reporting.

How to Report Effectively

Open a support ticket from the dashboard or post in #support on Discord. Include:

  • The full HTTP status code and the response body (the cf-ray response header too, if present).
  • Approximate timestamp in UTC.
  • Model name and which endpoint you called.
  • A minimal cURL that reproduces it (mask your real API key!).
  • Whether the self-test above works for you on the same key.
Tickets that arrive with these details get a real answer first try. Tickets without them almost always need a back-and-forth before we can help.