Skip to main content

Overview

The LemonData API is OpenAI-compatible, which means you can use the official OpenAI SDK with just a base URL change. We also support native Anthropic and Gemini request formats.

Base URL

https://api.lemondata.cc

Authentication

All API endpoints require authentication using a Bearer token:
Authorization: Bearer sk-your-api-key
Get your API key from the Dashboard.

Supported Endpoints

Chat & Text Generation

EndpointMethodDescription
/v1/chat/completionsPOSTOpenAI-compatible chat completions
/v1/messagesPOSTAnthropic-compatible messages API
/v1/responsesPOSTOpenAI Responses API

Embeddings & Rerank

EndpointMethodDescription
/v1/embeddingsPOSTCreate text embeddings
/v1/rerankPOSTRerank documents

Images

EndpointMethodDescription
/v1/images/generationsPOSTGenerate images from text
/v1/images/editsPOSTEdit images

Audio

EndpointMethodDescription
/v1/audio/speechPOSTText-to-speech (TTS)
/v1/audio/transcriptionsPOSTSpeech-to-text (STT)

Video

EndpointMethodDescription
/v1/videos/generationsPOSTCreate video generation task
/v1/videos/generations/{id}GETGet video task status

Music

EndpointMethodDescription
/v1/music/generationsPOSTCreate music generation task
/v1/music/generations/{id}GETGet music task status

3D Generation

EndpointMethodDescription
/v1/3d/generationsPOSTCreate 3D model generation task
/v1/3d/generations/{id}GETGet 3D task status

Models

EndpointMethodDescription
/v1/modelsGETList all available models
/v1/models/{model}GETGet specific model info

Response Format

All responses follow a consistent format:

Success Response

{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "created": 1234567890,
  "model": "gpt-4o",
  "choices": [...],
  "usage": {
    "prompt_tokens": 10,
    "completion_tokens": 20,
    "total_tokens": 30
  }
}

Error Response

{
  "error": {
    "message": "Invalid API key provided",
    "type": "invalid_api_key",
    "code": "invalid_api_key"
  }
}

Rate Limits

Rate limits vary by account tier:
TierRequests/min
User1,000
Partner1,500
VIP2,000
Rate limit headers are included in all responses:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1234567890

OpenAPI Specification

OpenAPI Spec

Download the complete OpenAPI 3.0 specification