Documentation

Integrate in 5 minutes, zero code changes

Quick Start

1. Create AccountRegistration page Sign up and the system will auto-generate an API Key.

2. Top Up BalanceAdd funds via bank transfer on the console billing page. Balance credited after admin review.

3. Call APIUse your API Key. Fully compatible with OpenAI / Anthropic.

OpenAI Compatible Format

If you're using the OpenAI SDK, just change base_url and api_key:

Python (OpenAI SDK)
from openai import OpenAI

client = OpenAI(
    base_url="http://47.253.249.242/v1",
    api_key="sk-yq-your-key-here"
)

# Non-streaming
response = client.chat.completions.create(
    model="claude-sonnet-4-20250514",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello!"}
    ],
    max_tokens=1024
)
print(response.choices[0].message.content)

# Streaming
stream = client.chat.completions.create(
    model="claude-sonnet-4-20250514",
    messages=[{"role": "user", "content": "Write a poem"}],
    stream=True
)
for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")
curl
curl http://47.253.249.242/v1/chat/completions \
  -H "Authorization: Bearer sk-yq-your-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-20250514",
    "messages": [{"role": "user", "content": "Hello"}],
    "max_tokens": 1024
  }'
Node.js
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "http://47.253.249.242/v1",
  apiKey: "sk-yq-your-key-here",
});

const response = await client.chat.completions.create({
  model: "claude-sonnet-4-20250514",
  messages: [{ role: "user", content: "Hello!" }],
});

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

Anthropic Compatible Format

Also supports Anthropic Messages API format:

Python (Anthropic SDK)
import anthropic

client = anthropic.Anthropic(
    base_url="http://47.253.249.242",
    api_key="sk-yq-your-key-here"
)

message = client.messages.create(
    model="claude-sonnet-4-20250514",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello!"}]
)
print(message.content[0].text)
curl (Anthropic)
curl http://47.253.249.242/v1/messages \
  -H "x-api-key: sk-yq-your-key-here" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-20250514",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello"}]
  }'

API Endpoints

POST/v1/chat/completionsChat Completions (OpenAI format)
POST/v1/messagesMessages (Anthropic format)
GET/api/v1/modelsList available models

Supported Models

claude-opus-4-20250514
claude-opus-4-6
claude-sonnet-4-20250514
claude-sonnet-4-6
claude-haiku-4-5-20251001
claude-3-5-sonnet-20241022
claude-3-5-haiku-20241022
gpt-4o
gpt-4o-mini
gpt-4-turbo

For full model list and pricing, see Pricing page

Notes

- API Keys start with sk-yq-, shown only once after creation. Save securely.

- API returns 402 when balance is insufficient. Please top up promptly.

- Streaming fully supported. Token usage counted asynchronously after stream ends.

- For issues, contact: support@originstartai.com