OpenAI-compatible AI API

Api.Airforce exposes an OpenAI-compatible endpoint — and the Anthropic Messages API — behind one base URL. Point the SDK you already use at https://api.airforce/v1, swap the key, and call 200+ models across providers with pay-as-you-go pricing and a free tier.

OpenAI SDK

from openai import OpenAI

client = OpenAI(
    base_url="https://api.airforce/v1",   # the only change
    api_key="YOUR_KEY",
)

resp = client.chat.completions.create(
    model="gpt-5.1",                       # or any model id
    messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)

Anthropic SDK

from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.airforce",
    api_key="YOUR_KEY",
)

msg = client.messages.create(
    model="claude-sonnet-4.6",
    max_tokens=512,
    messages=[{"role": "user", "content": "Hello!"}],
)
print(msg.content[0].text)

Endpoints

  • POST /v1/chat/completions — OpenAI Chat Completions
  • POST /v1/messages — Anthropic Messages
  • GET /v1/models — list available models

Next steps

Frequently asked questions

What does "OpenAI-compatible" mean here?
Api.Airforce implements the same HTTP API and request/response shape as OpenAI’s Chat Completions endpoint (/v1/chat/completions). Any client or library built for the OpenAI API works unchanged — you only change the base URL to https://api.airforce/v1 and use your Airforce key.
How do I switch an existing OpenAI integration over?
Set the base URL to https://api.airforce/v1 and swap the API key. Keep using the official OpenAI SDK; just pick a model id from our catalog. No other code changes are needed.
Does the Anthropic API work too?
Yes. The same key also speaks the Anthropic Messages API (/v1/messages), so the official Anthropic SDK works by pointing baseURL at https://api.airforce. You get both protocols behind one endpoint and one key.
Which tools work out of the box?
Anything that supports an OpenAI-compatible endpoint — Cursor, Cline, Claude Code, Aider, Continue, SillyTavern, Open WebUI, LibreChat and many more. There are step-by-step setup guides for 25+ tools in the docs.
Is there a free tier?
A free account needs no credit card and can call the models on the free tier at $0; premium models are pay-as-you-go. See the pricing page for details.
Create a free accountSee pricing