API integration guide

Three steps to integrate: sign up → get an API Key → call 400+ models. Fully OpenAI-compatible, so you can switch models without changing code.

1Sign up and get an API Key

  1. Go to the signup page and register with your phone number or email address — you get free credits the moment you sign up.
  2. Complete identity verification as the platform guides you (individual or business) to protect your account and your quality of service.
  3. Once signed in, create an API Key on the “API Keys” page of your dashboard. The key is shown only once, at creation — store it somewhere safe.
💡 The platform also supports BYOK (Bring Your Own Key): bind your own provider API Key to avoid platform fees, and get one-stop key management, usage analytics and quota control.

2Configure the OpenAI SDK (Python)

The APIGOTO API is fully compatible with the OpenAI SDK. All you change is base_url and api_key:

from openai import OpenAI

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

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

print(response.choices[0].message.content)

Calling with cURL

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

3Pick a model and start calling

The platform manages 400+ leading models across 70+ model providers. You only need to remember one platform model name — the system routes to the best provider automatically, and fails over when something goes wrong:

CapabilityProviders coveredProtocol
Text chatClaude, GPT, Gemini, DeepSeek, Qwen and moreOpenAI chat/completions、Anthropic messages
Image generationGPT-series image models and moreOpenAI images
Video generationLeading video modelsOpenAI images compatible surface
Embeddings / audioLeading embedding and speech modelsOpenAI embeddings / compatible protocols
⚡ Smart routing: the platform picks a route automatically by exact model → exact protocol → association priority → provider priority → health score. Several providers back up the same model, and a single request can fail over across up to 3 credentials.

4Billing

  • Pay-as-you-go: no subscription fee, billed on actual token usage, with credits usable across every model and provider.
  • Transparent pricing: the model pricing page shows each model's official price and platform price in real time, so costs are clear at a glance.
  • BYOK is free: calls made with your own provider key incur no platform fees.
  • Balance / points: top up your balance or redeem points, paying online through Alipay.

FAQ

How do I switch models after integrating?

Just change the model field in your request — no code changes needed. The platform maps its model names to each upstream provider's real model IDs automatically.

Is streaming supported?

Yes. Add stream: true to your request to turn on SSE streaming, compatible with the OpenAI SDK's streaming interface.

What happens if an API call fails?

The system fails over automatically. If it still fails, send us a report through Feedback and we will handle it as quickly as we can on a working day.

Where do I find my call logs and usage?

Sign in to your dashboard and open “Call logs” and “Usage analytics” to see the model, tokens and cost behind every single call.