FAQ
Integration
Q: I already use the official OpenAI SDK. How much code do I need to change to migrate?
A: Just two parameters:
# Before (official OpenAI)
client = OpenAI(api_key="sk-...")
# After (iDreame)
client = OpenAI(
base_url="https://api.idreame.ai/v1",
api_key="sk-xxxxxxxx", # use this platform's token
)The rest of your code needs no changes.
Q: Which language SDKs are supported?
A: Any OpenAI-compatible SDK works, including but not limited to:
- Python:
openai,langchain,llama-index - JavaScript/TypeScript:
openai,ai(Vercel AI SDK) - Go:
go-openai - Java:
openai-java - Rust:
async-openai
Any HTTP client or framework that supports a custom base_url can connect directly.
Q: How do I use it in a ChatGPT-style client (e.g. ChatBox, Open WebUI)?
A: In the client settings, find the API address or Base URL option, enter https://api.idreame.ai/v1, and fill in your token.
Q: What is the difference between this platform's API and the official OpenAI API?
A: Only the Base URL differs; the endpoint paths, parameter formats, and response structures match OpenAI. This platform is a multi-model aggregation gateway built on the OpenAI-compatible protocol — one token to route across many models.
Tokens & permissions
Q: How many tokens can one account create?
A: There is currently no limit. We recommend creating a separate token per project for easier management.
Q: What permissions can a token have?
A: You can configure:
- Quota limit: the maximum cumulative spend for the token
- Expiry: the date the token automatically becomes invalid
- Model group: restrict the token to specific models
- IP restriction: allow only specific IPs to use it
Q: What if my token leaks?
A: Sign in to the console immediately, delete the leaked token on the Tokens page, and create a new one. A deleted token stops working instantly, so a prior leak incurs no further spend.
Billing
Q: Is billing by request count or by token count?
A: By the actual number of tokens consumed, not by request count. A short message consumes fewer tokens and therefore costs less.
Q: Where do I see my balance?
A: After signing in to the console, the balance is shown in real time in the top status bar. Detailed records are on the Usage page.
Q: How do I know how many tokens each API call consumed?
A: Every non-streaming response includes a usage field:
"usage": {
"prompt_tokens": 28,
"completion_tokens": 120,
"total_tokens": 148
}For streaming requests, set stream_options: {"include_usage": true} to get usage in the final chunk.
Troubleshooting
Q: How do I handle a 401 error?
A: Check the following:
- Header format is correct:
Authorization: Bearer sk-xxxxxxxx - The token exists (verify on the console Tokens page)
- The token has not been deleted or disabled
Q: How do I handle a 403 error?
A: Possible causes:
- Insufficient account balance — recharge
- The token's quota limit is reached
- The requested model is not in the token's allowed group
- Your request IP is not in the token's allowed range
Q: How do I handle a 429 error?
A: You hit the rate limit. We recommend:
- Lowering the number of concurrent requests
- Adding a suitable delay between requests
- Using exponential backoff on retries (see the error codes doc)
Q: A model keeps returning 503. What do I do?
A: The model's upstream channel may be temporarily unavailable. We recommend:
- Waiting a few minutes and retrying
- Switching to another model with similar capability
- Checking the console for service status announcements
Other
Q: How do I contact you?
A: Please reach us through the contact options provided in the console or the site announcements.