Skip to content

API Endpoints ​

Most clients need an API address (base URL) during setup. TokenFlux exposes three entry points, one per protocol format.

Protocol Entry Points ​

Protocol formatBase URLTypical request path
OpenAI formathttps://tokenflux.dev/v1POST /chat/completions or POST /responses
Anthropic formathttps://tokenflux.devPOST /v1/messages
Gemini formathttps://tokenflux.devPOST /v1beta/models/<model-id>:generateContent

The OpenAI and Anthropic endpoints can be copied from the top of the API keys page:

Endpoint section at the top of the API keys page with one-click copy for the OpenAI and Anthropic format endpoints

Which Format to Use ​

The client dictates the format, and the group must support that same format.

FormatClients
OpenAI format (ends with /v1)OpenCode, DeepSeek Harness with an OpenAI protocol, and anything labelled "OpenAI compatible"
Anthropic format (no /v1)Claude Code and other clients speaking the Anthropic protocol natively
Gemini formatClients and SDKs on Google's native protocol, where the model ID goes in the request path

If the client's setting is named ANTHROPIC_BASE_URL, use the Anthropic format. If it is OPENAI_BASE_URL, use the OpenAI format. Base URL is a generic field name and does not identify a protocol; check the selected provider type first. Each integration guide states the exact value.

The OpenAI format includes distinct APIs such as Chat Completions and Responses; Codex uses Responses, for example. Sharing a base URL does not mean a model supports every API. Check that the group and model support the requests your client sends. Complete test requests are in Troubleshooting.

For image request timeouts, try Streaming Images.

Authentication ​

The API key is sent in a request header, which most clients handle automatically.

Entry pointAccepted credentials
OpenAI format, Anthropic formatAuthorization: Bearer <key>, x-api-key: <key>, x-goog-api-key: <key>
Gemini formatAll of the above, plus the query parameter ?key=<key>

The OpenAI and Anthropic formats do not accept a key in the query string and return 400. On the Gemini format, ?api_key= is deprecated; use ?key= or a header.

With a composite key, the model ID needs a prefix; on the Gemini format the prefix goes in the path.

TokenFlux Documentation