Skip to main content
This skill teaches your coding agent how to integrate LemonData’s 300+ AI APIs just by describing what you need. It is packaged as one shared agent-first skill and works with any coding agent that supports skill or 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.
This page documents a reusable skill packaging layer, not a protocol-compatibility surface. If you need endpoint, SDK, or client setup guidance, use the dedicated integration pages for those tools.

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

Use the canonical non-interactive install command:
npx skills add https://github.com/hedging8563/lemondata-skills --skill lemondata-api-integration -y
This installs the shared lemondata-api-integration skill from the LemonData skills repository.If your tool does not support the installer, copy the skills/lemondata-api-integration/ folder from the repository into your tool’s shared skills or rules directory.

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-5.4",
    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-5.4",
    "suggestions": [{"id": "gpt-5.4"}, {"id": "gpt-5-mini"}],
    "hint": "Did you mean 'gpt-5.4'? Use GET https://api.lemondata.cc/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://api.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-5.4, 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 coding agent that supports shared skill or rules directories. When the installer is supported, npx skills add places the shared lemondata-api-integration skill in the detected location automatically.
Re-run the installer:
npx skills add https://github.com/hedging8563/lemondata-skills --skill lemondata-api-integration -y

Resources

Agent-First API

Full reference for structured error hints

API Documentation

Complete API reference

Models

Browse all 300+ available models

llms.txt

Machine-readable API overview for AI agents
Have questions? Check our GitHub Issues or contact support@lemondata.cc