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.
| Protocol | Endpoint | Use case |
|---|---|---|
| OpenAI Chat Completions | https://ai1api.com/v1/chat/completions | General OpenAI-compatible clients |
| OpenAI Responses | https://ai1api.com/v1/responses | Codex and Responses clients |
| Anthropic Messages | https://ai1api.com/v1/messages | Claude Code and Anthropic clients |
| Gemini | https://ai1api.com/v1beta | Gemini 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.