Skip to main content

Step 1: Account Setup

1.1 Register

Visit Mixroute Api to register:
  • Log in to the console
  • Sign up with your mobile number and verify

1.2 Add Credits

Top up in the console:
  1. Click “Wallet Management” to pay (Stripe supported)
  2. Click “Personal Center”
New users receive a $1 bonus upon registration

Step 2: Create API Key

2.1 Generate Key

  1. Click “Token Management” in the navigation
  2. Click “Add Token”
  3. Click “Submit” to generate a key

Step 3: Start Calling

3.1 Connection Info

ConfigValue
API URL (Base URL)https://console.mixroute.io/v1
API KeyYour created key
Request FormatFully OpenAI API compatible

3.2 Test Call

Quick test with curl:
curl https://console.mixroute.io/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

3.3 Code Examples

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://console.mixroute.io/v1"
)

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

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

Next Steps

Congratulations! You’ve successfully set up Mixroute Api. Next you can:

FAQ

Just change the model parameter in your request:
{
  "model": "gpt-4o"
}
or
{
  "model": "claude-sonnet-4-20250514"
}
or
{
  "model": "gemini-2.5-pro"
}
Mixroute Api is OpenAI API compatible, supporting all OpenAI SDK languages:
  • Python
  • JavaScript/TypeScript
  • Java
  • Go
  • C#/.NET
  • Ruby
  • PHP
Log in to the console to view:
  • Account balance
  • Usage history
  • Consumption statistics
  1. Check API documentation
  2. Review common errors
  3. Contact support: support@mixroute.io
Save your API key safely and regularly check usage logs in the console to optimize costs. Happy coding!