OpenAI-compatible access to 200+ models. Change the base URL, use your SarangAI API key, and start building.
01 · QUICKSTART
Base URL
https://sarangai.id/api/gateway/v1Authentication
Authorization: Bearer sk-sarang-xxxcurl -X POST https://sarangai.id/api/gateway/v1/chat/completions \
-H "Authorization: Bearer sk-sarang-xxx" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek/deepseek-r1","messages":[{"role":"user","content":"Hello SarangAI!"}]}'02 · TOOL INTEGRATIONS
Select a tool to see its SarangAI connection settings and setup commands.
OpenAI API Key: sk-sarang-xxx
Base URL: https://sarangai.id/api/gateway/v103 · API REFERENCE
https://sarangai.id/api/gateway/v1/chat/completionsChat & Reasoning — Send messages to your chosen model and receive an OpenAI-compatible response.
/modelsModel catalog — List 200+ active models with provider, context, and pricing.
/images/generationsImage generation — An image generation endpoint compatible with the OpenAI pattern.
04 · MODELS
Use these exact IDs in your API requests. The full catalog is available in Model Catalog.
openai/gpt-4oopenai/gpt-4o-minianthropic/claude-3.5-sonnetanthropic/claude-3.5-haikudeepseek/deepseek-r1google/gemini-2.5-flash05 · RELIABILITY
| HTTP | Status | Description |
|---|---|---|
| 200 OK | Success | Successful request and completion returned. |
| 401 | Unauthorized | Invalid, missing, or revoked SarangAI API key. |
| 402 | Payment Required | Insufficient virtual credit balance. Top up via /user/wallet. |
| 429 | Too Many Requests | Rate limit reached. Please implement exponential backoff. |
| 500 / 502 | Upstream Failure | Upstream provider error. The gateway will automatically attempt retry or fallback. |
06 · BILLING
Token-based balance deduction per request
Credits are deducted dynamically per successful request based on input (prompt) and output (completion) token consumption according to model pricing. No hidden fees or recurring monthly subscriptions.
Recharge your credits instantly via the Wallet panel with supported automated payment channels.