API quickstart: first Claude, GPT or Gemini call
Send your first request to Claude, GPT or Gemini through one OpenAI-compatible endpoint, in five steps.
On this page
If your code already talks to OpenAI or Anthropic, the change is two lines: the base URL and the key. These steps take you from a new account to the model's first reply, and the last example comes in four languages: cURL, Python, JavaScript and PowerShell.
Create your account#
Sign up with your email, or continue with Google or GitHub. We ask for a phone number once so we can reach you about your account or balance.
Create an accountAfter sign-up you land right on the create-key page.Top up your balance#
API requests are paid from your balance as you go, and every model costs less than its official price. Before you pay, the top-up screen shows the balance that will be added to your account. Details in Pricing and balance.
Claude Sonnet 5.5 price per 1M tokens
Input$0.60Official price:$2Output$3Official price:$10Official price from the provider's page, checked October 19, 2026.
Create an API key#
In your dashboard open API → Keys and create a key for the provider whose models you want. Copy it into an environment variable:
export KHABEER_API_KEY="YOUR_5ABEER_API_KEY"Pick your base URL#
Use the URL that matches the code you already have. Each format reads the key from its usual header.
OpenAI-compatiblehttps://api.5abeer.ai/v1Authorization: Bearer <KEY>Anthropic-compatiblehttps://api.5abeer.aix-api-key: <KEY>Geminihttps://api.5abeer.ai/v1betax-goog-api-key: <KEY>Send your first request#
Copy the example and run it in the terminal where you saved the key. Pick the format and the language; you can switch the model from the menu above the code.
curl --request POST "https://api.5abeer.ai/v1/chat/completions" \ --header "Authorization: Bearer $KHABEER_API_KEY" \ --header "Content-Type: application/json" \ --data '{"model":"claude-sonnet-5.5","messages":[{"role":"user","content":"Write a product idea in one sentence."}]}'Response{ "id": "chatcmpl-9f2", "object": "chat.completion", "model": "claude-sonnet-5.5", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Hello! How can I help you today?" }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 21, "completion_tokens": 12, "total_tokens": 33 } }The key is read from KHABEER_API_KEY, so it never appears in your code.
If you get a reply shaped like the one under the code, everything works.
If the request fails#
INVALID_API_KEY: the key is wrong or was copied incompletely. Check that the environment variable is set in the same terminal.INSUFFICIENT_BALANCE: your balance doesn't cover this request. Top up, then try again.MODEL_PLATFORM_NOT_ALLOWED: the key belongs to another provider. Create a key for this model's provider.
Every code and what it means is in Errors and fixes.
What's next#
Was this page helpful?