Skip to main content

Overview

LemonData uses pay-as-you-go pricing. You only pay for what you use, with no subscriptions or minimum commitments.

How Billing Works

  1. Add credits to your account
  2. Use the API - costs are deducted per request
  3. Monitor usage in your dashboard
  4. Top up when your balance is low

Pricing Models

Per-Token Pricing

Most text generation models are priced per million tokens:
ModelInput (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:
ModelPrice 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)

Important: Video, music, and 3D generation tasks are billed at submission time, not upon completion.
For async generation tasks (video, music, 3D models):
  1. Billing occurs immediately when you submit the task
  2. You receive a task_id to poll for status
  3. No automatic refunds if the task fails
This is because upstream providers charge us when the task is submitted, regardless of the outcome. If you experience task failures, please contact [email protected] for assistance.
# Example: Video generation billing
response = client.post("/v1/videos/generations", json={
    "model": "sora-2",
    "prompt": "A sunset over the ocean"
})
# ⚠️ You are billed NOW, not when the video is ready

task_id = response.json()["task_id"]
# Poll for status...

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

# Rough estimation
def estimate_tokens(text):
    return len(text) / 4  # Approximate for English

# Actual count (for OpenAI models)
import tiktoken
encoder = tiktoken.encoding_for_model("gpt-4o")
tokens = encoder.encode("Your text here")
print(f"Token count: {len(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:
{
  "usage": {
    "prompt_tokens": 50,
    "completion_tokens": 100,
    "total_tokens": 150
  }
}

Cost Optimization

Use smaller models (GPT-4o-mini, Gemini Flash) for simple tasks.
Cache responses for repeated identical requests.
Keep prompts concise while maintaining clarity.
Limit response length when full responses aren’t needed.
Streaming doesn’t cost extra but improves perceived performance.

Low Balance Alerts

Configure alerts when your balance drops:
  1. Go to Dashboard → Settings → Notifications
  2. Set your threshold amount
  3. Receive email notifications

Adding Credits

Payment Methods

  • Alipay (支付宝)
  • WeChat Pay (微信支付)
  • Stripe (Visa, Mastercard)

Steps

  1. Log in to Dashboard
  2. Click Add Credits
  3. Select amount and payment method
  4. Complete payment
Credits are added instantly after payment confirmation.

API Key Limits

You can set spending limits on individual API keys:
  1. Go to Dashboard → API Keys
  2. Click on a key to edit
  3. Set Usage Limit
When the limit is reached, requests with that key will return 402 Payment Required.

Invoices

For business accounts, invoices are available:
  1. Go to Dashboard → Billing
  2. View transaction history
  3. Download invoices as PDF

Questions?

Contact [email protected] for billing inquiries.