TARANPHASE
API RELAY
HELP CENTERTARAN PHASE // RELAY

API DOCS

One key to relay every major AI model. OpenAI-compatible endpoints, pay-as-you-go billing.

# 01 · QUICK START

▸ Get your API key in 4 steps

Register an account at the Console, redeem your free welcome quota, create an API key, and make your first request. The whole flow takes under two minutes.

  1. STEP 1.Open the Console and sign up (free welcome quota of $0.5 is credited instantly).
  2. STEP 2.Top up your balance with a redemption code, or start with the free quota.
  3. STEP 3.Go to the panel and click + NEW KEY — copy your sk-... key and keep it safe.
  4. STEP 4.Call the endpoint below with your key. Done.

# 02 · AUTHENTICATION

▸ Bearer token

Every request must carry your API key in the Authorization header. Keys are shown in full only once — store them somewhere safe.

Authorization: Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

▸ Base URL

https://api.taran-ai.com

# 03 · CHAT COMPLETIONS

▸ OpenAI-compatible endpoint

POST /v1/chat/completions — works with any OpenAI SDK. Just swap the base URL and the model name.

curl https://api.taran-ai.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TARAN_API_KEY" \
  -d '{
    "model": "deepseek-chat",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Hello!"}
    ],
    "stream": true
  }'

▸ Python

from openai import OpenAI

client = OpenAI(
    base_url="https://api.taran-ai.com/v1",
    api_key="sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
)

resp = client.chat.completions.create(
    model="deepseek-chat",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)

▸ Node.js

import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://api.taran-ai.com/v1',
  apiKey: process.env.TARAN_API_KEY,
});

const chat = await client.chat.completions.create({
  model: 'deepseek-chat',
  messages: [{ role: 'user', content: 'Hello!' }],
});
console.log(chat.choices[0].message.content);

▸ Streaming (SSE)

Set "stream": true to receive Server-Sent Events. Each chunk is a standard OpenAI delta. Finish with data: [DONE].

# 04 · MODELS & PRICING

▸ Available models

ModelTypeInputOutput
deepseek-chatGeneral chat$0.40 / 1M$0.60 / 1M
deepseek-reasonerDeep reasoning$0.40 / 1M$0.60 / 1M

More providers are being connected. The console shows the live model list with per-model availability.

# 05 · BILLING

▸ Quota system

Your balance is measured in quota. $1 USD = 500,000 quota. Every request deducts quota by token usage × model ratio.

▸ How a request is charged

cost = (prompt_tokens × model_ratio + completion_tokens × completion_ratio) / 500000

Example: 1,000 prompt + 500 completion tokens on deepseek-chat = (1000 × 0.20 + 500 × 0.30) / 500000 = 0.0007 quota, i.e. $0.0007.

▸ Top up

Redeem codes are issued at purchase. Enter a code in the panel and the balance updates instantly.

# 06 · ERROR CODES

HTTPCodeMeaning
401invalid_api_keyMissing or wrong API key
402insufficient_quotaBalance exhausted — top up
404model_not_foundUnknown model name
429rate_limit_exceededToo many requests, slow down
500upstream_errorUpstream provider failure (auto retried)
503overloadedAll channels busy, retry later

Errors follow the OpenAI error format: { "error": { "message": ..., "type": ..., "code": ... } }.

# 07 · RATE LIMITS & FREE QUOTA

▸ Free welcome quota

Every new account receives $0.5 of free quota automatically. The terminal playground is open to guests with a shared free pool — sign up to keep your own balance.

▸ Fair use

Guest playground requests are capped at 300 output tokens and 2,000 input characters per message.

# 08 · FAQ

▸ Can I use my existing OpenAI SDK?

Yes. Change base_url to https://api.taran-ai.com/v1 and the model name to one of ours. No other code changes.

▸ Is my key safe?

Keys are shown in full only at creation. Traffic between you and the relay is TLS-encrypted.

▸ What happens when an upstream provider is down?

The relay automatically retries on redundant channels, so your request keeps working.

▸ How do I get more quota?

Buy a redemption code and redeem it in the console panel.

← BACK HOME