An endpoint compatible with OpenAI Chat Completions. Tools and libraries built for the OpenAI API only need the base URL set to https://api.goiapi.com/v1 and your API key.
POST https://api.goiapi.com/v1/chat/completionsBody
The body is JSON in the OpenAI Chat Completions format. Required fields:
model: the model name, listed on Models or returned byGET /v1/models. Model aliases work too.messages: the list of messages.
Set max_tokens (or max_completion_tokens). Funds are reserved based on this value before the model is called, so keeping it no higher than you need prevents requests from being rejected when your balance is low. See Limits and balance.
curl https://api.goiapi.com/v1/chat/completions \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-haiku-5-5",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Write a Python function that reverses a string"}]
}'Response
Without streaming: a Chat Completions JSON response (choices, usage, and so on).
With streaming ("stream": true): see Streaming. For OpenAI-format requests, stream_options.include_usage is always enabled, so the stream ends with an extra chunk that contains usage.
Notes
- Tools that use the OpenAI Responses API (recent Codex CLI versions,
client.responses.create()) call/v1/responses. - Every response includes an
x-request-idheader. Send this ID to support when you need a request looked up. - For Claude models, prefer the Anthropic format (for example with Claude Code). Some models are only available through one format; calling a model through a format it does not support returns a
503error.