Make your first request
Claim a funded key, verify one routed response, pin a live model, and confirm streaming from a terminal.
TutorialsAvailability: Stable
On this page
Before you begin
Estimated time: 10 minutes.
You need a terminal with curl, an email address for the prepaid claim flow, and a safe server-side place to store one secret. By the end, you will have a funded Singular API key and evidence that non-streaming, explicit-model, and streaming requests work from your environment.
1. Claim a funded API key
Open the gateway's prepaid top-up flow, enter your receipt email, choose an amount, and complete checkout. After payment confirms, the gateway redirects to /claim and reveals the funded mr_... API key once. Copy that exact key immediately and use it below.
Do not create a separate key in Settings for this Quickstart. Settings-created keys begin with zero balance, and the current self-service billing flow does not fund an individually issued Settings key.
2. Configure your terminal
export SINGULAR_API_KEY="mr_your_key_here"
export OPENAI_BASE_URL="https://api.impossi.build/v1"Keep the key on your server. Never embed it in browser code, a mobile binary, a public repository, screenshots, or client-side logs.
3. Send one routed request
curl "$OPENAI_BASE_URL/chat/completions" \
-H "Authorization: Bearer $SINGULAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"messages": [{"role": "user", "content": "Explain model routing in one sentence."}]
}'Checkpoint: verify the response
A successful response has HTTP status 200, object: "chat.completion", at least one choices entry, and assistant text at choices[0].message.content:
{
"id": "chatcmpl_...",
"object": "chat.completion",
"model": "auto",
"choices": [
{
"index": 0,
"message": {"role": "assistant", "content": "..."},
"finish_reason": "stop"
}
],
"usage": {"prompt_tokens": 12, "completion_tokens": 18, "total_tokens": 30}
}When you request
model: "auto", the public response currently preserves the requested ID asmodel: "auto". Do not use that field as proof of the internal provider or selected upstream model.
If the request returns 401, confirm that the claimed key was copied exactly. A balance error means the key cannot reserve the request cost; do not retry it in a loop.
4. Pin an explicit model
Open the live model catalog or fetch pricing JSON, choose an exact current model ID, and rerun the same request after replacing:
"model": "auto"with:
"model": "provider/live-model-id"Checkpoint: the explicit ID must come from the live Singular catalog. A successful response preserves that requested ID in the public model field; it still does not prove which physical upstream ultimately served the request.
5. Confirm streaming
curl -N "$OPENAI_BASE_URL/chat/completions" \
-H "Authorization: Bearer $SINGULAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"stream": true,
"messages": [{"role": "user", "content": "Count from one to three."}]
}'Checkpoint: the response contains data-only SSE frames beginning with data: and terminates with data: [DONE]. Do not wait for a named Anthropic event or require a final usage-only chunk.
Complete the tutorial
You now have a funded key, a verified Chat Completions response, an explicit-model variation, and a working stream.
Next, connect an SDK or client, review authentication and key handling, or use the Chat Completions reference while implementing production timeouts, bounded retries, and parameter validation.