API reference

Top Tools AI API

One OpenAI-compatible endpoint for every Top Tools AI plan. Keep your existing SDK, change the base URL and API key, and use your plan's model ID.

Base URL

https://top-tools-ai.com/api/v1

Auth

Bearer API key

Format

JSON · streaming (SSE)

01 · Start here

Quickstart

Make your first request in three steps.
  1. 1Create an API key in your dashboard.
  2. 2Point your OpenAI client at https://top-tools-ai.com/api/v1.
  3. 3Set model to your plan's model ID: Top-Tools-Ai-Basic, Top-Tools-Ai-Pro or Top-Tools-Ai-Max.
curl https://top-tools-ai.com/api/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "Top-Tools-Ai-Pro",
    "messages": [
      { "role": "user", "content": "What is the capital of France?" }
    ]
  }'

02

Authentication

Send your API key as a Bearer token in the Authorization header of every request.
http
Authorization: Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Keep your key secret. Never expose it in client-side code or public repositories.

03

Plans and models

Each plan has one model ID. Requests to it are shared across that plan's models, and each plan includes everything in the plans below it. Click an ID to copy it.
We've just updated our models. Old model names such as Qwen-3.8-Max, GLM-5.3-Flash and Top-Tools-Ai no longer work. Change the model in your app to your plan's model ID below. If you send an old name, the error message tells you which ID is yours.

Basic · $9.99 a month

5 concurrent requests · 512K context · 4 models

Top-Tools-AiGemini 3.8 FlashClaude Haiku 5.5GPT-6 Luna

Pro · $19.99 a month

10 concurrent requests · 1M context · 7 models

Top-Tools-AiClaude Fable 5.1GPT-6 AstraGPT-6.1 TerraGemini 3.8 FlashClaude Haiku 5.5GPT-6 Luna

Max · $49.99 a month

30 concurrent requests · 1M context · 10 models

Top-Tools-AiClaude Fable 5.1GPT-6 AstraClaude Opus 5.5GPT-6.1 SolClaude Sonnet 5GPT-6.1 TerraGemini 3.8 FlashClaude Haiku 5.5GPT-6 Luna

How models are picked

Your request goes to one of your plan's models. A specific model isn't guaranteed for any request. Every plan includes vision, tool calls and image generation.

Billing

Every plan has unlimited usage, billed monthly or yearly. Yearly saves up to 17%. Basic's first month is $4.99. See plans and pricing.

Paying with credit

No plan? Any plan's model ID also works with account credit, charged per million tokens (input / output): Top-Tools-Ai-Basic $0.20 / $1.00, Top-Tools-Ai-Pro $0.40 / $2.00 and Top-Tools-Ai-Max $0.80 / $4.00. Credit requests run 5 at a time.

04

Chat completions

POST /chat/completions follows the OpenAI chat format. Use your plan's model ID; a model ID from a plan you don't have returns a 403.

Response

json
{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "model": "Top-Tools-Ai-Pro",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "The capital of France is Paris."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 24,
    "completion_tokens": 9,
    "total_tokens": 33
  }
}

Streaming

Set "stream": true to receive server-sent events, exactly like the OpenAI API.

bash
curl https://top-tools-ai.com/api/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "Top-Tools-Ai-Pro",
    "stream": true,
    "messages": [{ "role": "user", "content": "Write a haiku about APIs." }]
  }'

Tool calls

Pass OpenAI-style tools. Run the call yourself and send the result back as a tool message. Every plan supports this.

request body
{
  "model": "Top-Tools-Ai-Pro",
  "messages": [{ "role": "user", "content": "What's the weather in Paris?" }],
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "get_weather",
        "description": "Get the current weather for a city",
        "parameters": {
          "type": "object",
          "properties": { "city": { "type": "string" } },
          "required": ["city"]
        }
      }
    }
  ]
}

Vision

Send images as image_url content parts, using a URL or a base64 data URL. Every plan accepts them.

request body
{
  "model": "Top-Tools-Ai-Basic",
  "messages": [
    {
      "role": "user",
      "content": [
        { "type": "text", "text": "Describe this image." },
        { "type": "image_url", "image_url": { "url": "data:image/png;base64,..." } }
      ]
    }
  ]
}

05

Image generation

POST /images/generations returns a URL to the generated image. Included on every plan.
bash
curl https://top-tools-ai.com/api/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A futuristic city at night, neon lights, photorealistic",
    "n": 1,
    "size": "1024x1024"
  }'
response
{
  "created": 1720000000,
  "data": [
    { "url": "https://..." }
  ]
}

06

Limits

5 / 10 / 30

concurrent requests

Basic / Pro / Max. Per account, across chat completions and image generation. One more returns 429.

512K / 1M

context

Basic 512K, Pro 1M, Max 1M tokens per request.

Unlimited

usage

No token caps and no requests-per-minute limit on any plan.

When you hit your concurrency limit, retry after one of your active requests finishes. To run more at once, move up a plan.

07

Errors

Errors return a JSON body with an error object.
json
{
  "error": {
    "message": "Too many concurrent requests",
    "type": "rate_limit_error",
    "code": "concurrency_limit_exceeded"
  }
}
400model_not_foundNot a plan model ID, such as an old model name. The message names your plan's model ID: change the model in your app to it.
401—Invalid or missing API key.
403model_access_deniedThat model ID is for a plan above yours, or you have no plan or credit. The message names your own model ID.
429concurrency_limit_exceededMore requests at once than your plan allows: 5 on Basic, 10 on Pro, 30 on Max.
502provider_unavailableThe model provider could not complete the request.
502provider_empty_responseThe response ended without visible text after the bounded retry.
500—Internal gateway error.

Ready to build?

Create an API key in the dashboard and send your first request.

Go to dashboard