Open API: choose the protocol that matches your client

AI1API exposes OpenAI-compatible and Anthropic-compatible protocols. The usual Base URL is https://ai1api.com/v1; the protocols available to a key depend on its group. Copy the endpoint from the console, then use the request format that matches the client.

ProtocolEndpointUse case
OpenAI Chat Completionshttps://ai1api.com/v1/chat/completionsGeneral OpenAI-compatible clients
OpenAI Responseshttps://ai1api.com/v1/responsesCodex and Responses clients
Anthropic Messageshttps://ai1api.com/v1/messagesClaude Code and Anthropic clients
Geminihttps://ai1api.com/v1betaGemini CLI and Gemini-compatible clients

Request examples

Chat Completions
curl https://ai1api.com/v1/chat/completions \
  -H "Authorization: Bearer $AI1API_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5.6-sol","messages":[{"role":"user","content":"Hello"}],"stream":false}'
Responses
curl https://ai1api.com/v1/responses \
  -H "Authorization: Bearer $AI1API_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5.6-sol","input":"Hello","stream":false}'
Anthropic Messages
curl https://ai1api.com/v1/messages \
  -H "x-api-key: $AI1API_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-sonnet-4-5","max_tokens":64,"messages":[{"role":"user","content":"Hello"}]}'

Protocol availability depends on the group assigned to the API key. Check the troubleshooting page and the console group when you see a 403 or unavailable model.