One API key unlocks 100+ frontier AI models with pay-as-you-go TOP Points (TP). TOP AI natively speaks both OpenAI Chat Completions and Anthropic Messages protocols — just point your existing SDK base URL to us.
Configure timeout to at least 300 seconds and enable stream: true so 10-second SSE keepalives preserve long reasoning responses. Failed upstream 503 responses are billed 0 TP.
OpenAI-Compatible Endpoint
https://topai.id/v1
Supports /v1/chat/completions, /v1/models, /v1/images/generations, and /v1/balance.
Anthropic-Compatible Endpoint
https://topai.id
Native /v1/messages & /v1/messages/count_tokens with full system prompts, tool calling, vision, and extended thinking.
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.TOPAI_API_KEY, // tp-...
baseURL: "https://topai.id/v1",
});
const res = await client.chat.completions.create({
model: "deepseek-v4.1-flash-token", // or claude-sonnet-5, gpt-6-sol, router-request
messages: [{ role: "user", content: "Explain zero-downtime failover in 3 bullets." }],
});
console.log(res.choices[0].message.content);import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: process.env.TOPAI_API_KEY, // tp-...
baseURL: "https://topai.id", // uses /v1/messages natively
});
const msg = await client.messages.create({
model: "claude-sonnet-5",
max_tokens: 1024,
messages: [{ role: "user", content: "Review this TypeScript function for race conditions." }],
});Make your first chat completion call in under 60 seconds.
Bearer token & x-api-key headers plus Customer Sub-Keys.
Python, Node.js, Vercel AI SDK, LangChain, Cursor, Cline, Claude Code & n8n.
Chat completions, Anthropic messages, models list, image generation & balance.
Recommended timeout, streaming SSE keepalive, and tool-calling practices.
Generate production images with Flux models via /v1/images/generations.
Pick flagship models or call router-request / router-token for auto-failover.
Per-request flat vs metered per-token math and 0 TP failed-upstream guarantee.
Live global FX to USDT calculator (TRC20/BEP20/Polygon) plus local rails.
Browse real-time tariffs across 100+ models in 23 global currencies.