Quickstart

ClawToken provides a unified API that gives you access to hundreds of AI models through a single endpoint. Get started in minutes with your existing OpenAI SDK or simple HTTP requests.

79 models available β€” including the latest gpt-5.5, claude-opus-4-7, and claude-sonnet-4-6. See live pricing and pick your model.
View Pricing β†’
Base URL: https://clawtoken.dev/v1
All API requests should be made to this base URL. The API is fully compatible with the OpenAI API format.

Authentication

Authenticate your API requests by including your API key in the Authorization header.

Authorization: Bearer YOUR_API_KEY

Base URL

https://clawtoken.dev/v1

All API endpoints are relative to this base URL. For example, the Chat Completions endpoint is:

POST https://clawtoken.dev/v1/chat/completions

Chat Completions

Create a chat completion by sending a POST request with your model and messages.

Using OpenAI SDK

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://clawtoken.dev/v1"
)

response = client.chat.completions.create(
    model="claude-sonnet-4-6",
    messages=[
        {"role": "user", "content": "Hello!"}
    ]
)

print(response.choices[0].message.content)

Direct HTTP Request

import requests

response = requests.post(
    "https://clawtoken.dev/v1/chat/completions",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
    },
    json={
        "model": "gpt-5.5-xhigh",
        "messages": [
            {"role": "user", "content": "Hello!"}
        ]
    }
)

print(response.json())

Parameters

ParameterTypeDescription
model RequiredstringThe model to use for completion (e.g., claude-sonnet-4-6, openai/gpt-5.5, claude-opus-4-7)
messages RequiredarrayArray of message objects with role and content
stream OptionalbooleanIf true, returns a stream of server-sent events (SSE)
temperature OptionalnumberSampling temperature between 0 and 2. Default: 1
max_tokens OptionalintegerMaximum number of tokens to generate
top_p OptionalnumberNucleus sampling parameter. Default: 1

Streaming

Enable streaming to receive partial responses in real-time using Server-Sent Events (SSE).

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://clawtoken.dev/v1"
)

stream = client.chat.completions.create(
    model="claude-opus-4-7",
    messages=[
        {"role": "user", "content": "Write a short poem"}
    ],
    stream=True
)

for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

Supported Models

ClawToken gives you access to models from leading AI providers:

OpenAI
gpt-5.5-xhigh
OpenAI
openai/gpt-4o
OpenAI
openai/gpt-4o-mini
Anthropic
claude-opus-4-7
Anthropic
claude-sonnet-4-6
Anthropic
claude-haiku-4-5-20251001
Google
google/gemini-3-pro
Google
google/gemini-2.5-flash
See the full list of 79 supported models with current pricing at /pricing. Use the model identifier as shown there.

Error Handling

The API returns standard HTTP status codes and JSON error responses:

Status CodeMeaning
401Invalid or missing API key
400Invalid request parameters
404Endpoint not found
429Rate limit exceeded
502Upstream service error

Error response format:

{
  "error": {
    "message": "Invalid API key",
    "type": "auth_error"
  }
}