Quickstart: Connect to Earbowe API
Get your API key, set the base URL, and make your first request in under 5 minutes.
Quickstart: Connect to Earbowe API
This guide gets you from zero to a working API call in under 5 minutes.
1. Get an API key
Open the Earbowe Console, sign in, and create an API key. It starts with sk-.
2. Set the base URL
| Region | Base URL |
|---|---|
| Global | https://api.earbowe.com/v1 |
| China direct | https://api.3861343.xyz/v1 |
Always include /v1 — it’s required for OpenAI-compatible clients.
3. Test with curl
curl https://api.earbowe.com/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sk-YOUR-KEY" \ -d '{ "model": "gpt-4o-mini", "messages": [{"role": "user", "content": "Hello!"}] }'4. List available models
curl https://api.earbowe.com/v1/models \ -H "Authorization: Bearer sk-YOUR-KEY"5. Use with any OpenAI SDK
from openai import OpenAI
client = OpenAI( api_key="sk-YOUR-KEY", base_url="https://api.earbowe.com/v1",)
response = client.chat.completions.create( model="gpt-4o-mini", messages=[{"role": "user", "content": "Hello!"}],)print(response.choices[0].message.content)