Skip to main content

Step 1: Get Your API Key

1

Create an account

Sign up at lemondata.cc using your email, Gmail, or GitHub account.
2

Add credits

Open the dashboard and add credits to your account. LemonData uses pay-as-you-go pricing with no minimum commitment.
3

Create an API key

Go to Dashboard → API Keys and create a new key. Copy it securely because it is only shown once.
Keep your API key secure. Never expose it in client-side code or public repositories.

Step 2: Install a Client

pip install openai

Step 3: Make Your First Request

For most new integrations, start with Chat Completions on POST /v1/chat/completions.
curl https://api.lemondata.cc/v1/chat/completions \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.4",
    "messages": [
      {"role": "user", "content": "What is the capital of France?"}
    ]
  }'
Use POST /v1/responses only when you explicitly need Responses-specific behavior. Some Responses-only fields depend on the selected model and routed path.

Try Different Models

LemonData supports 300+ models. Change only the model field:
response = client.chat.completions.create(model="gpt-5.4", messages=[{"role": "user", "content": "Hello"}])
response = client.chat.completions.create(model="gpt-5-mini", messages=[{"role": "user", "content": "Hello"}])
response = client.chat.completions.create(model="claude-sonnet-4-6", messages=[{"role": "user", "content": "Hello"}])
response = client.chat.completions.create(model="gemini-2.5-flash", messages=[{"role": "user", "content": "Hello"}])
response = client.chat.completions.create(model="deepseek-r1", messages=[{"role": "user", "content": "Hello"}])

Enable Streaming

stream = client.chat.completions.create(
    model="gpt-5.4",
    messages=[{"role": "user", "content": "Tell me a short story."}],
    stream=True
)

for chunk in stream:
    delta = chunk.choices[0].delta.content
    if delta:
        print(delta, end="")

What’s Next?

Authentication

Learn about API key management and security.

OpenAI SDK

Use official OpenAI SDKs with LemonData.

API Reference

Explore the full endpoint reference.

Models

Browse current model availability and pricing.