Skip to main content
This skill teaches your coding agent how to integrate any of LemonData’s 300+ AI APIs by just describing what you need. It works with Claude Code, Cursor, GitHub Copilot, Windsurf, and any tool that supports skill/rules files.The API is Agent-First — even if the agent guesses a model name wrong, the error response tells it exactly how to fix it.

How It Works

  1. You describe what you need — “I want to use GPT-4 in my Python project”
  2. The agent calls the API — it may guess a model name or endpoint
  3. If anything goes wrong — the API returns structured hints (did_you_mean, suggestions, retry_after)
  4. The agent self-corrects — reads the hints and retries with the right parameters
  5. You get working code — typically on the first or second attempt

Install

Verify Installation

Ask your coding agent:
What skills are available?
If you see lemondata-api-integration, the installation was successful.

Get Your API Key

1

Visit LemonData

2

Sign In

Create an account or log in
3

Get API Key

Navigate to Dashboard → API Keys and create a new key
4

Copy the Key

Your key starts with sk-... — save it securely
You don’t need to configure the API Key in advance. When you use the skill, the agent will ask for your key and include it in the generated code.

Examples

Chat Completion

You say:
I want to use GPT-4 in my Python project
The agent generates:
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": "user", "content": "Hello!"}]
)

print(response.choices[0].message.content)
If the agent guesses a wrong model name (e.g. gpt5), the API returns:
{
  "error": {
    "code": "model_not_found",
    "did_you_mean": "gpt-4o",
    "suggestions": [{"id": "gpt-4o"}, {"id": "gpt-4o-mini"}],
    "hint": "Did you mean 'gpt-4o'? Use GET /v1/models to list all available models."
  }
}
The agent reads did_you_mean, corrects the model name, and retries — all automatically.

Image Generation

You say:
Generate images with Flux in Node.js
The agent calls the image API, handles errors, and generates complete code with download and save logic.

Speech Recognition

You say:
Integrate speech-to-text in my app
The agent generates code with the correct /v1/audio/transcriptions endpoint and audio file handling.

Agent-First Error Recovery

Every error response includes structured hints that any coding agent can parse. See the full Agent-First API reference for details.
ErrorWhat the API ReturnsWhat the Agent Does
Wrong model namedid_you_mean + suggestionsAuto-corrects and retries
Insufficient balancebalance_usd + cheaper suggestionsSwitches to affordable model
Model unavailablealternatives + retry_afterSwitches to available model
Rate limitedretry_after (exact seconds)Waits and retries
Context too longsuggestions with larger modelsSwitches to bigger context model

Native Endpoint Optimization

When you call /v1/chat/completions with a Claude or Gemini model, the API returns optimization headers:
X-LemonData-Hint: This model supports native Anthropic format. Use POST /v1/messages for better performance.
X-LemonData-Native-Endpoint: /v1/messages
The agent automatically switches to the native endpoint for better performance (no format conversion, extended thinking, prompt caching).

Model Discovery

No need to search documentation:
# Machine-readable API overview
curl https://lemondata.cc/llms.txt

# List models by category
curl "https://api.lemondata.cc/v1/models?category=chat" -H "Authorization: Bearer sk-KEY"
curl "https://api.lemondata.cc/v1/models?category=image" -H "Authorization: Bearer sk-KEY"

# Filter by capability
curl "https://api.lemondata.cc/v1/models?tag=coding" -H "Authorization: Bearer sk-KEY"

Supported Capabilities

TypeExamples
ChatGPT-4o, Claude, Gemini, DeepSeek
Image GenerationMidjourney, Flux, Stable Diffusion
Video GenerationSora, Runway, Kling, Luma AI
Music GenerationSuno
3D ModelsTripo3D
AudioText-to-Speech, Speech-to-Text
Embeddingstext-embedding-3
Rerankbce-reranker, qwen3-rerank

Best Practices

API Key Security

Use environment variables. Never commit keys to git or expose them in frontend code.

Cost Management

Set usage limits in your dashboard. Check error.balance_usd to monitor costs programmatically.

Be Direct

Say “I want to generate images in Python” instead of “Does LemonData have an image API?”

Describe Your Scenario

“I’m building a chatbot with GPT-4” gives the agent more context than “Use GPT-4”.

FAQ

Try mentioning “LemonData” or “LemonData API” in your request:
Use LemonData to integrate GPT-4 in my project
LemonData’s Agent-First API returns structured error hints. If the agent guesses a wrong model name, the error includes did_you_mean with the correct name and suggestions with alternatives. The agent reads these and auto-corrects on the next attempt.
Any tool that supports skill/rules files: Claude Code, Cursor, GitHub Copilot, Windsurf, and more. The npx add-skill installer auto-detects and installs to all supported tools.
Re-run the installer:
npx add-skill hedging8563/lemondata-api-skill -y

Resources

Have questions? Check our GitHub Issues or contact [email protected]