Skip to content

API

API reference

This site speaks the OpenAI, Anthropic and Gemini APIs. Use the SDK of any of them with the address and a key from this site.

Base URL

Every request goes to this site. SDKs for the OpenAI format take the address with /v1; the Anthropic and Gemini SDKs take the address alone.

Authentication

Send your API key with every request. All formats accept Authorization: Bearer <key>, and each SDK's own header works too:

Endpoints

Which endpoints answer depends on the models this site offers. A model listed on the pricing page works through the endpoints of its kind.

Anthropic format

Call /v1/messages as you would Anthropic's API. Claude Code and other tools built on Claude use this format.

Gemini format

Gemini requests name the model in the path, as in Google's API:

Streaming

Set stream to true in OpenAI and Anthropic requests to receive the answer as server-sent events while the model writes. For Gemini, call :streamGenerateContent instead of :generateContent.

Errors

Errors come back with an HTTP status code and a message, in the format of the API you called. A 401 means the key is missing or not valid; a 429 means a rate limit was reached, so wait and try again.