As low as
3% of official pricing,
StartExample: at 0.2 model rate, pay 10.00 → usable $50.00. Balance is usable across all models. Actual pricing is subject to the website display.
Welcome to YesAPI. This guide walks you through the essential information you need before integrating YesAPI into production: available models, pricing and discounts, API keys, security, request flow, limits, troubleshooting, and support.YesAPI provides a unified, stable, cost-effective API entry point for Claude, GPT, image, video, music, and other mainstream AI models. Please read this page carefully before going live.
Getting Started#
1. Available Models & Market#
You can browse the model index on Market, or jump directly into a model category:| Category | Use Cases | Entry |
|---|
| Chat Models | Chat, writing, coding, agents, knowledge base Q&A | Chat Models |
| Image Models | Text-to-image, image editing, product images, design assets | Image Models |
| Video Models | Text-to-video, image-to-video, short clips, ad creatives | Video Models |
| Music Models | Music generation, songs, vocals, background music | Music Models |
2. Pricing & Discounts#
YesAPI is designed for developers and teams that need long-term, high-volume, stable access to AI models.YesAPI converts subscription-based model access into unified API access.
Platform campaigns, recharge bonuses, and model-side cost advantages can combine into a lower overall usage cost.
Model availability, pricing, and billing rules should always be checked in the current console.
3. Creating and Securing Your API Key#
Every request must include your API key in the request headers:Security recommendations:Never expose your API key in frontend code, mobile apps, or public repositories.
Route requests through your own backend whenever possible.
Use separate keys for different projects to simplify usage tracking and rotation.
Rotate the key immediately if you suspect exposure.
4. Base URL#
OpenAI-compatible SDK configuration:Claude / Anthropic-style tools can point to YesAPI according to the tool's configuration requirements:5. Request Flow#
2.
Copy the model name into the model field.
3.
Use https://yesapi.online or https://yesapi.online/v1 as the Base URL.
4.
Add Authorization: Bearer sk-your-api-key to the headers.
5.
Call the Chat, Messages, Images, Video, or Music endpoint according to the model type.
6.
Log responses, errors, latency, and usage for production debugging.
6. First API Call#
7. SDK Examples#
Python#
Node.js#
8. Streaming#
Streaming is recommended for chat, coding, and long-form generation:{
"model": "gpt-5-6-sol",
"messages": [{"role": "user", "content": "Write a product introduction"}],
"stream": true
}
When streaming is enabled, the server returns incremental content through SSE. The frontend should read chunks line by line and close the connection when the stream ends.9. Limits and Production Tips#
Chat products: limit per-user concurrency and enable streaming.
Batch jobs: use a queue and cap retry attempts.
Image, video, and music: use longer timeouts and avoid duplicate submissions.
Agents and coding tasks: log the full chain and set maximum step limits.
Cost-sensitive tasks: choose models by task instead of sending every request to the highest-tier model.
10. Error Handling#
| Status | Common Cause | Recommendation |
|---|
| 400 | Invalid parameters, wrong model name, invalid messages format | Check the model page and request body |
| 401 | Missing, invalid, or expired API key | Check the Authorization header |
| 402 | Insufficient balance or quota | Check balance and recharge entry |
| 404 | Wrong path or endpoint type | Check Base URL and endpoint path |
| 429 | Too many requests or too much concurrency | Reduce concurrency and add backoff |
| 500 | Upstream or service error | Log request details and retry later |
11. Support#
When reporting an issue, prepare:Request time and request path
Status code and response body
Whether streaming was enabled
Whether it was a batch or high-concurrency task
Then check the corresponding model page, or visit yesapi.online for platform access.As low as
3% of official pricing,
StartExample: at 0.2 model rate, pay 10.00 → usable $50.00. Balance is usable across all models. Actual pricing is subject to the website display.