API Documentation
Drop-in OpenAI-, Anthropic- and Gemini-compatible endpoints for every model on your account. Bring your favorite SDK.
Get an API keyBase URL
Send requests to the API host shown below. All endpoints live under /v1 (OpenAI-style) or /v1beta (Gemini).
https://airforce enterprise.example/v1
Authentication
Mint a key on the API Keys page, then send it as a Bearer token. The Anthropic-style /v1/messages endpoint reads x-api-key; Gemini's endpoints read x-goog-api-key.
Authorization: Bearer afk-•••••••••••••••••••••••••••••••••
List models
/v1/modelsReturns the models you can call from this account, formatted as OpenAI's model list with a pricing extension showing what you'll be billed per request.
curl https://YOUR-HOST/v1/models \ -H "Authorization: Bearer afk-YOUR_KEY"
Chat completions
/v1/chat/completionsDrop-in OpenAI chat-completions surface. Standard request/response shape — your existing OpenAI SDK works unmodified once you point it at our base URL.
curl https://YOUR-HOST/v1/chat/completions \
-H "Authorization: Bearer afk-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"messages": [{"role": "user", "content": "hi"}]
}'Responses
/v1/responsesOpenAI's newer Responses API (input/output_text shape). Supports the same models as chat completions.
curl https://YOUR-HOST/v1/responses \
-H "Authorization: Bearer afk-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "gpt-4o-mini", "input": "hi" }'Anthropic messages
/v1/messagesAnthropic-native messages endpoint. Forward your existing claude/anthropic SDK requests unchanged.
curl https://YOUR-HOST/v1/messages \
-H "x-api-key: afk-YOUR_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-3-5-sonnet-20241022",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "hi"}]
}'Gemini generate-content
/v1beta/models/<model>:generateContentGoogle Gemini's generative-language endpoint. Authenticate via x-goog-api-key.
curl "https://YOUR-HOST/v1beta/models/gemini-2.0-flash-exp:generateContent" \
-H "x-goog-api-key: afk-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "contents": [{ "role": "user", "parts": [{ "text": "hi" }] }] }'Billing
Each request is billed against your credit balance. The price for every model is shown in the Models tab.
Streaming is supported on every endpoint — send `stream: true` (or call Gemini's `:streamGenerateContent`) and the response comes back as SSE.
- Per-model per-call cap available; set it from the Models tab.
- Your current balance is on the dashboard overview.
- Calls are billed based on token usage.
Errors
Errors come back in the OpenAI-shaped envelope so SDKs treat them naturally.
{
"error": {
"message": "...",
"type": "invalid_request_error",
"code": null
}
}400— bad request (missing model, no channel for that model, invalid JSON, …)401— missing or invalid API key402— insufficient credits429— rate-limited500— internal error or upstream failure