Pricing Docs About Contact Log In Get Started

API Documentation

Get up and running with the DeepThinking AI API in minutes. Fully compatible with OpenAI SDKs — just change the base URL.

Quick Start

The DeepThinking AI API is a drop-in replacement for the OpenAI API. If your application already uses the OpenAI SDK, you only need to change two things: the base URL and your API key.

Base URL

https://api.deepthinking-ai.com/v1

Authentication

All requests require an API key passed via the Authorization header:

Authorization: Bearer YOUR_API_KEY

Generate API keys in your dashboard after signing up.

Chat Completions

POST /v1/chat/completions

Send messages to any supported model and receive AI-generated responses. Fully compatible with the OpenAI chat completions format.

Python (OpenAI SDK)

from openai import OpenAI

client = OpenAI(
    api_key="your-api-key",
    base_url="https://api.deepthinking-ai.com/v1"
)

response = client.chat.completions.create(
    model="claude-sonnet-4-20250514",
    messages=[
        {"role": "user", "content": "Hello, how are you?"}
    ]
)

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

JavaScript / Node.js

import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'your-api-key',
  baseURL: 'https://api.deepthinking-ai.com/v1',
});

const response = await client.chat.completions.create({
  model: 'gpt-4o',
  messages: [
    { role: 'user', content: 'Hello, how are you?' }
  ],
});

console.log(response.choices[0].message.content);

cURL

curl https://api.deepthinking-ai.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Supported Models

Access all major frontier models through a single API key and endpoint:

Provider Model Model ID
Anthropic Claude Opus 4 claude-opus-4-20250514
Anthropic Claude Sonnet 4 claude-sonnet-4-20250514
Anthropic Claude Haiku 3.5 claude-3-5-haiku-20241022
OpenAI GPT-4o gpt-4o
OpenAI o3 o3
OpenAI GPT-4o Mini gpt-4o-mini
Google Gemini 2.5 Pro gemini-2.5-pro
Google Gemini 2.5 Flash gemini-2.5-flash
DeepSeek DeepSeek R1 deepseek-r1

Streaming

All chat completion requests support streaming. Set stream: true to receive server-sent events as the model generates its response:

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

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

Rate Limits & Usage

Rate limits depend on your plan:

Rate limit headers are included in every response:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
X-RateLimit-Reset: 1718120000

Error Handling

The API returns standard HTTP error codes with JSON error bodies:

{
  "error": {
    "message": "Rate limit exceeded. Please retry after 30 seconds.",
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded"
  }
}

Need Help?

Questions about the API? Contact our team — we typically respond within 24 hours.