Documentation Index
Fetch the complete documentation index at: https://docs.lemondata.cc/llms.txt
Use this file to discover all available pages before exploring further.
Overview
LemonData uses pay-as-you-go pricing. You only pay for what you use, with no subscriptions or minimum commitments.How Billing Works
- Add credits to your account
- Use the API - costs are deducted per request
- Monitor usage in your dashboard
- Top up when your balance is low
Pricing Models
Per-Token Pricing
Most text generation models are priced per million tokens:| Model | Input (per 1M tokens) | Output (per 1M tokens) |
|---|---|---|
| GPT-4o | $1.75 | $7.00 |
| GPT-4o-mini | $0.105 | $0.42 |
| Claude Opus 4.5 | $3.50 | $17.50 |
| Claude Sonnet 4.5 | $2.10 | $10.50 |
| Claude Haiku 4.5 | $0.70 | $3.50 |
| Gemini 2.5 Pro | $0.875 | $7.00 |
| Gemini 2.5 Flash | $0.1225 | $0.525 |
| DeepSeek R1 | $0.385 | $1.533 |
| DeepSeek V3.2 | $0.196 | $0.294 |
Prices shown are discounted platform prices. Actual prices may vary. Check the pricing page for current rates.
Per-Request Pricing
Image, video, and audio models are priced per request:| Model | Price per Request |
|---|---|
| DALL-E 3 (1024x1024) | $0.04 |
| Midjourney | $0.05 |
| Sora Video (5s) | $0.20 |
| Whisper (per minute) | $0.006 |
| TTS-1 | $0.015 |
Async Task Billing (Video/Music/3D and Some Image Models)
For task-based generation, creating the task may reserve or pre-deduct the estimated cost. Final settlement happens only after the async task reaches a terminal success state during polling or finalization.
- Submit the task. LemonData may place an estimated pre-deduction or reservation to verify balance and spending limits.
- Follow the returned
poll_url, or callGET /v1/tasks/{id}, until the task reaches a terminal status. - When the task completes successfully, final settlement records the usage and the task response includes
billing_transaction_id. - If creation fails or the terminal status is failed, the pending amount is refunded or released and the request is marked non-billable.
Billing Transaction IDs
Successful billable OpenAI-compatible non-streaming JSON responses includebilling_transaction_id when settlement has completed before the response is finalized. The same value is also exposed as the X-Billing-Transaction-ID response header for browser and server integrations. Native compatibility routes, such as Gemini /v1beta, may expose the value via the header only to preserve the provider-native response shape. For async media tasks, poll the returned poll_url or GET /v1/tasks/{id}; the task response includes billing_transaction_id once settlement is complete. Streaming responses may settle after the stream has already been sent, so use the dashboard usage logs for reconciliation when the header is absent.
Token Counting
Tokens are the basic units of text processing:- ~4 characters = 1 token (English)
- ~1-2 characters = 1 token (Chinese)
- 1 image = varies by size and detail
Estimating Tokens
Usage Tracking
Dashboard
Monitor your usage in the Dashboard:- Real-time balance
- Usage history by model
- Cost breakdown
- API key usage
API Response
Each response includes usage information:Cost Optimization
Use appropriate models
Use appropriate models
Use smaller models (GPT-4o-mini, Gemini Flash) for simple tasks.
Implement caching
Implement caching
Cache responses for repeated identical requests.
Optimize prompts
Optimize prompts
Keep prompts concise while maintaining clarity.
Set max_tokens
Set max_tokens
Limit response length when full responses aren’t needed.
Use streaming for long responses
Use streaming for long responses
Streaming doesn’t cost extra but improves perceived performance.
Low Balance Alerts
Configure alerts when your balance drops:- Go to Dashboard → Settings → Notifications
- Set your threshold amount
- Receive email notifications
Adding Credits
Payment Methods
- Alipay (支付宝)
- WeChat Pay (微信支付)
- Stripe (Visa, Mastercard)
Steps
- Log in to Dashboard
- Click Add Credits
- Select amount and payment method
- Complete payment
API Key Limits
You can set spending limits on individual API keys:- Go to Dashboard → API Keys
- Click on a key to edit
- Set Usage Limit
402 Payment Required.
Invoices
For business accounts, invoices are available:- Go to Dashboard → Billing
- View transaction history
- Download invoices as PDF