Quickstart
Create an API key and make your first call in minutes, in any dialect.
This page walks you through a minimal working integration: create a key → send your first request → check usage.
Step 1: Create an API key
Sign up, log in to the console, and create a key on the "API Keys" page. Keys look like sk-sole-….
The full key is shown only once at creation; the server stores only a hash. Save it to a secret manager or environment variable immediately — if lost, you must create a new one.
Step 2: First call (OpenAI-compatible)
We recommend starting with the Responses API — the same entry point coding tools like Codex use:
curl https://api.soleapi.com/v1/responses \
-H "Authorization: Bearer $SOLEAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-fable-5",
"input": "Say hello in one sentence"
}'from openai import OpenAI
client = OpenAI(
api_key="sk-sole-...",
base_url="https://api.soleapi.com/v1",
)
resp = client.responses.create(
model="claude-fable-5",
input="Say hello in one sentence",
)
print(resp.output_text)import OpenAI from 'openai'
const client = new OpenAI({
apiKey: 'sk-sole-...',
baseURL: 'https://api.soleapi.com/v1',
})
const resp = await client.responses.create({
model: 'claude-fable-5',
input: 'Say hello in one sentence',
})
console.log(resp.output_text)Anthropic format (Messages API)
If you use the Anthropic SDK or Claude Code, call /v1/messages with the x-api-key header:
curl https://api.soleapi.com/v1/messages \
-H "x-api-key: $SOLEAPI_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-fable-5",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Say hello in one sentence"}]
}'import anthropic
client = anthropic.Anthropic(
api_key="sk-sole-...",
base_url="https://api.soleapi.com",
)
msg = client.messages.create(
model="claude-fable-5",
max_tokens=1024,
messages=[{"role": "user", "content": "Say hello in one sentence"}],
)
print(msg.content[0].text)Gemini format
With the Google GenAI SDK, use the /v1beta endpoints and the x-goog-api-key header:
curl "https://api.soleapi.com/v1beta/models/gemini-2.5-pro:generateContent" \
-H "x-goog-api-key: $SOLEAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [{"parts": [{"text": "Say hello in one sentence"}]}]
}'from google import genai
client = genai.Client(
api_key="sk-sole-...",
http_options={"base_url": "https://api.soleapi.com"},
)
resp = client.models.generate_content(
model="gemini-2.5-pro",
contents="Say hello in one sentence",
)
print(resp.text)The Gemini dialect does not accept the key via the ?key= query parameter — it must be in the x-goog-api-key header. See Authentication.
Step 3: Check usage & billing
The console shows your live balance, usage trends, per-key stats, and per-request details. See Billing & balance for how pricing works.
Next steps
- Streaming: SSE in all three dialects.
- Error handling & retries: make your integration resilient to 429s and upstream hiccups.
- API reference: fields and response shapes for each endpoint.