Documentation

Choose an API format

Use the endpoint that matches your SDK and the kind of output your model supports. TheOldAPI issues one subscriber key for all supported formats.

Base URLs and endpoints

Use casePathRequest input
OpenAI Chat CompletionsPOST /v1/chat/completionsUse messages for conversation turns. OpenAI SDK base URL is https://theoldllm.com/v1.
OpenAI ResponsesPOST /v1/responsesUse input with a supported text model. Keep the same OpenAI SDK base URL.
Anthropic MessagesPOST /v1/messagesSet the Anthropic SDK base URL to https://theoldllm.com. Provide messages and max_tokens.
Gemini generateContentPOST /v1beta/models/{model}:generateContentUse a supported Gemini model ID and send contents with parts.
Image generationPOST /v1/images/generationsUse an image model, a prompt, and n: 1.
Text classificationPOST /v1/classifyUse JEV with inputs and labels.

Quick start

Use https://theoldllm.com/v1 as the OpenAI-compatible base URL. Send your TheOldAPI key as a Bearer token and use a model ID from the catalog.

curl https://theoldllm.com/v1/chat/completions \
  -H "Authorization: Bearer $THEOLDAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-6-luna","messages":[{"role":"user","content":"Hello"}]}'

Authentication

Use a subscriber key from your API keys page. The Anthropic Messages endpoint also accepts the key in the x-api-key header.

Switching models or clients

Copy the exact model ID from the model catalog. Check whether the model supports the capabilities you send, such as tools, image input or structured output. Image input on a text model and image generation are different capabilities.

If the request returns HTTP 404, check the model ID and endpoint. If it returns HTTP 401, check your key and authentication header. If it returns HTTP 429, check the error code to distinguish rate, concurrency and daily credit limits.