# GoiAPI API docs

> Call AI models through GoiAPI with one API key, using the OpenAI or Anthropic format.

Source: https://goiapi.com/en/docs

## Docs

- [Quickstart](https://goiapi.com/en/docs/quickstart.md): Create an account, top up with USDT, create an API key and call your first model through GoiAPI in a few minutes, with curl, an SDK or Claude Code.
- [Authentication with API keys](https://goiapi.com/en/docs/authentication.md): Send your GoiAPI API key in the Authorization Bearer or x-api-key header, keep it in environment variables, and restrict each key by IP and model.
- [OpenAI-compatible API (Chat Completions)](https://goiapi.com/en/docs/openai-chat-completions.md): Call models through POST /v1/chat/completions on GoiAPI, compatible with OpenAI SDKs and tools; request body, streaming and how to change the base URL.
- [OpenAI Responses API](https://goiapi.com/en/docs/openai-responses.md): Call models through POST /v1/responses on GoiAPI (Codex CLI, OpenAI SDK responses.create); supported features, streaming events and limitations.
- [Anthropic-compatible API (Messages)](https://goiapi.com/en/docs/anthropic-messages.md): Call models through POST /v1/messages and count tokens with /v1/messages/count_tokens on GoiAPI; works with Claude Code and the Anthropic SDKs.
- [List models via the API](https://goiapi.com/en/docs/list-models.md): Get the models your API key can call with GET /v1/models on GoiAPI, in OpenAI or Anthropic format, sorted by name. Listing models is free of charge.
- [Streaming (SSE)](https://goiapi.com/en/docs/streaming.md): Receive responses incrementally with stream true on GoiAPI: SSE format for the OpenAI and Anthropic APIs, keep-alive pings and mid-stream errors.
- [Error codes](https://goiapi.com/en/docs/error-codes.md): HTTP error codes returned by GoiAPI (401, 402, 403, 404, 429, 503…), error body formats for the OpenAI and Anthropic APIs, and the x-request-id support ID.
- [Limits and balance](https://goiapi.com/en/docs/limits-and-balance.md): Per-minute request limits for API keys, how GoiAPI holds funds based on max_tokens, when you get a 402 error, body size and maximum run time.

## Integration guides

- [Claude Code](https://goiapi.com/en/docs/integrations/claude-code.md): Use Claude Code with your own API key: set ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN, pick a Claude model, then send a test message from your terminal.
- [Cursor](https://goiapi.com/en/docs/integrations/cursor.md): Use Cursor with your own API key: add it as the OpenAI API key, override the base URL, add the model name, then send a test message from the Cursor chat.
- [Cline / Roo Code](https://goiapi.com/en/docs/integrations/cline.md): Set up Cline and Roo Code in VS Code to call models with your API key: choose the OpenAI Compatible provider, enter the base URL, key and model name.
- [Codex CLI](https://goiapi.com/en/docs/integrations/codex.md): Set up Codex CLI with a custom model provider in ~/.codex/config.toml, keep your API key in an environment variable, then send a test prompt from the terminal.
- [OpenAI SDK](https://goiapi.com/en/docs/integrations/openai-sdk.md): Call models from Python or Node.js with the official OpenAI library: change only the base URL and API key, keep your existing code, then send a test request.
- [Anthropic SDK](https://goiapi.com/en/docs/integrations/anthropic-sdk.md): Call Claude models from Python with the official Anthropic library: change only the base URL and API key, keep your existing code, then send a test request.
- [curl](https://goiapi.com/en/docs/integrations/curl.md): Call the API over plain HTTP with curl, in OpenAI or Anthropic format: copy a ready-made request, add your API key and model name, then read the JSON reply.
