Documentation

Getting started

  1. Create an account and verify your email.
  2. Add credit on the Billing page.
  3. Create a key on the API keys page. Keys start with sk-tx-.
  4. Point your SDK at https://mytenon.com and use the key in place of the vendor's key.

Endpoints

APIPathAuth header
OpenAI Chat CompletionsPOST /v1/chat/completionsAuthorization: Bearer
OpenAI ResponsesPOST /v1/responsesAuthorization: Bearer
OpenAI EmbeddingsPOST /v1/embeddingsAuthorization: Bearer
Anthropic MessagesPOST /v1/messagesx-api-key or Bearer
GeminiPOST /v1beta/models/{model}:generateContent
POST /v1beta/models/{model}:streamGenerateContent
x-goog-api-key or ?key=
List modelsGET /v1/modelsany
OpenAI BatchPOST /v1/files
POST /v1/batches · GET /v1/batches/{id}
GET /v1/files/{id}/content
Authorization: Bearer
Anthropic Message BatchesPOST /v1/messages/batches
GET /v1/messages/batches/{id}/results
x-api-key or Bearer

Each endpoint speaks its vendor's protocol: send Claude models to /v1/messages, Gemini models to /v1beta, and OpenAI models to /v1/chat/completions or /v1/responses. The full model list and prices are on the pricing page.

SDK examples

from openai import OpenAI

client = OpenAI(base_url="https://mytenon.com/v1", api_key="sk-tx-...")
reply = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(reply.choices[0].message.content)

Batch API

Asynchronous jobs at discounted batch rates, through the OpenAI Files + Batches API (/v1/files, /v1/batches) and Anthropic Message Batches (/v1/messages/batches). Up to 50,000 requests per batch; results within 24 hours; you pay only for requests that complete. Prices and a quick start are on the Batch API page.

from openai import OpenAI
import json

client = OpenAI(base_url="https://mytenon.com/v1", api_key="sk-tx-...")

# requests.jsonl: one request per line
with open("requests.jsonl", "w") as f:
    for i, text in enumerate(["first document", "second document"]):
        f.write(json.dumps({
            "custom_id": f"doc-{i}",
            "method": "POST",
            "url": "/v1/chat/completions",
            "body": {"model": "gpt-4.1-mini",
                     "messages": [{"role": "user", "content": f"Summarise: {text}"}]},
        }) + "\n")

file = client.files.create(file=open("requests.jsonl", "rb"), purpose="batch")
batch = client.batches.create(input_file_id=file.id,
                              endpoint="/v1/chat/completions",
                              completion_window="24h")

# later
batch = client.batches.retrieve(batch.id)
if batch.status == "completed":
    print(client.files.content(batch.output_file_id).text)

Coding tools

Claude Code

export ANTHROPIC_BASE_URL=https://mytenon.com
export ANTHROPIC_AUTH_TOKEN=sk-tx-...
claude

Codex CLI

Add a provider to ~/.codex/config.toml, then export TENON_API_KEY:

model_provider = "tenon"
model = "gpt-4.1"

[model_providers.tenon]
name = "Tenon"
base_url = "https://mytenon.com/v1"
env_key = "TENON_API_KEY"
wire_api = "responses"

Anything OpenAI-compatible

Set the base URL to https://mytenon.com/v1 and the API key to your sk-tx- key.

Errors

StatusMeaning
400The request was rejected by the model provider; the message explains why.
401Missing, invalid, disabled or expired API key.
402Balance is used up, or the key reached its spending limit. Top up or raise the limit.
403The key is not allowed to use this model.
404Unknown model. Check the pricing page for exact names.
429Upstream capacity is temporarily exhausted. Retry with backoff.
503No upstream could serve the request right now. Retry shortly.

Limits

  • Request bodies are limited to 4.5 MB. Send large images by URL rather than base64 where the API allows it.
  • A single request can run for up to 5 minutes.
  • Realtime (WebSocket) APIs are not available.