Step 1: Get Your API Key
Add credits
Navigate to the dashboard and add credits to your account. Pay-as-you-go pricing with no minimum.
Create API key
Go to Dashboard → API Keys and create a new key. Copy it securely - it’s only shown once.
Keep your API key secure. Never expose it in client-side code or public repositories.
Step 2: Install SDK
Step 3: Make Your First Request
from openai import OpenAI
client = OpenAI(
api_key="sk-your-api-key",
base_url="https://api.lemondata.cc/v1"
)
response = client.chat.completions.create(
model="gpt-4o",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is the capital of France?"}
]
)
print(response.choices[0].message.content)
# Output: The capital of France is Paris.
Try Different Models
LemonData supports 300+ models. Just change the model parameter:
# OpenAI GPT-4o
response = client.chat.completions.create(model="gpt-4o", messages=messages)
# Anthropic Claude 3.5 Sonnet
response = client.chat.completions.create(model="claude-3-5-sonnet-20241022", messages=messages)
# Google Gemini 2.0
response = client.chat.completions.create(model="gemini-2.0-flash", messages=messages)
# DeepSeek R1
response = client.chat.completions.create(model="deepseek-r1", messages=messages)
Enable Streaming
For real-time responses, enable streaming:
stream = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Tell me a story"}],
stream=True
)
for chunk in stream:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")
What’s Next?