Tok0n API

One familiar API shape.

Access enabled AI models through a non-streaming, OpenAI-compatible chat completions endpoint.

Quick start

Base URL

https://tok0n.com/v1

Send your Tok0n API key as a Bearer token. Create and revoke keys from the dashboard. The full key is shown only once.

curl https://tok0n.com/v1/chat/completions \
  -H "Authorization: Bearer $TOK0N_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.5",
    "messages": [
      { "role": "user", "content": "Write a short headline for Tok0n" }
    ]
  }'

OpenAI JavaScript SDK

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.TOK0N_API_KEY,
  baseURL: "https://tok0n.com/v1",
});

const response = await client.chat.completions.create({
  model: "gpt-5.5",
  messages: [
    { role: "user", content: "Write a short headline for Tok0n" },
  ],
});

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

Endpoints

POST /v1/chat/completions

Accepts an OpenAI-compatible model and messages payload. Streaming is not supported in the private beta; omit stream or send stream: false.

GET /v1/models

Public endpoint returning only the model IDs currently enabled and verified by Tok0n. Use it instead of assuming a model is available.

Error responses

API errors use an OpenAI-shaped error object with a safe message, type, and code.

HTTPExample codeMeaning
400invalid_requestThe request body or selected feature is invalid.
401invalid_api_keyThe Tok0n API key is missing, invalid, or inactive.
402insufficient_tokensThe account cannot cover the request reservation.
429rate_limit_errorA per-key, concurrency, or global limit was reached.
500api_errorTok0n could not safely complete internal accounting.
502upstream_errorThe upstream provider failed or returned invalid data.
503rate_limit_unavailableGateway safety infrastructure is unavailable.

Rate limits and token billing

  • 60 requests per minute per active Tok0n API key.
  • 10 concurrent requests per user.
  • A 55 RPM global upstream safety limit during private beta.

Tok0n reserves tokens before calling the upstream provider, then charges the actual successful usage and releases the remainder. Upstream timeouts, network failures, invalid responses, and missing usage are not billed.

One purchased Tok0n token equals one token reported by the successful upstream response. Token packs are one-time USD purchases; subscriptions and automatic top-ups are not available.

FAQ

Which models can I use?

Call GET /v1/models. The catalogue is deliberately limited to models Tok0n has verified.

Does Tok0n support streaming?

Not during the private beta. Requests with streaming enabled return a 400 error.

Are prompts stored?

Tok0n request logs store operational metadata and token usage, not prompt or message content.

Is api.tok0n.com the base URL?

No. The launch base URL is https://tok0n.com/v1. A dedicated API subdomain may be introduced later.