Integration Guide

Reference docs for request examples, authentication, model catalog details, and error handling.

Use docs when you're ready to integrate

Start here for request format, SDK usage, public model IDs, and billing-related implementation notes.

Contents

1. Quick Start

Use the same request shape as OpenAI. Change only your base URL and the public model ID.

curl https://api.tokenoutput.cc/v1/chat/completions \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.6-plus",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

2. Authentication

All requests require your API key in the Authorization header.

Authorization: Bearer sk-your-api-key

3. SDK Usage

from openai import OpenAI

client = OpenAI(
    api_key="sk-your-api-key",
    base_url="https://api.tokenoutput.cc/v1"
)

resp = client.chat.completions.create(
    model="qwen3.6-plus",
    messages=[{"role": "user", "content": "Hello"}]
)
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'sk-your-api-key',
  baseURL: 'https://api.tokenoutput.cc/v1',
});

const resp = await client.chat.completions.create({
  model: 'qwen3.6-plus',
  messages: [{ role: 'user', content: 'Hello' }],
});

4. Streaming

Set stream: true to receive SSE chunks.

curl -N https://api.tokenoutput.cc/v1/chat/completions \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.6-plus",
    "stream": true,
    "messages": [{"role": "user", "content": "Please write a quick greeting."}]
  }'

5. Public Model ID List

These are the public model IDs currently available to users.

Public Model ID Description Limits Pricing
Loading model catalog...

6. Billing Notes

For plan comparison and buying guidance, use the pricing page.

7. Errors

CodeMeaning
400Bad request or unsupported model
401Invalid or missing API key
402Insufficient pay-as-you-go balance
429Rate limited
502Upstream provider error

Need an API key?

Create your account when you're ready to move from docs into live usage.

Get started