메인 콘텐츠로 건너뛰기

개요

LemonData는 일반적인 코딩 도구, SDK, 프레임워크가 최소한의 연결 코드로 통합할 수 있도록 여러 API 형식을 노출합니다. 이 페이지는 마케팅 매트릭스보다 의도적으로 범위를 좁혔습니다:
  • Supported는 구체적인 설정 경로를 문서화하고 LemonData가 해당 경로가 기대하는 프로토콜 형태를 노출함을 의미합니다.
  • Strong native path는 리포지토리에 해당 프로토콜 계열에 대한 직접적인 어댑터 또는 요청 형식의 증거가 있음을 의미합니다.
  • Best-effort는 통합이 작동할 수 있으나, 업스트림 클라이언트가 이 커스텀 게이트웨이 워크플로우를 안정적인 계약으로 취급하지 않음을 의미합니다.
지원되지 않는 필드는 일관되게 처리되지 않습니다. 호환성 경로에서는 일부 필드가 무시되거나 정규화됩니다. /v1/responses 경로에서는 요청된 동작을 보장할 수 없을 때 해당 경로가 명시적으로 400 또는 503 오류를 반환할 수 있습니다.

지원되는 API 형식

EndpointFormatUse Case
/v1/chat/completionsOpenAI Chat범용 호환성
/v1/responsesOpenAI Responses상태 저장 대화
/v1/messagesAnthropic MessagesClaude 고유 기능
/v1beta/models/:model:generateContentGoogle GeminiGemini 고유 기능

IDE 및 CLI 호환성

문서화된 도구 경로

ToolSupport LevelFormatNotes
CursorSupported with limitsOpenAI-compatibleBYOK 표준 채팅/편집기 흐름에서는 작동하며, Tab Completion 같은 Cursor가 관리하는 기능을 대체하지는 않습니다
Claude Code CLIStrong native pathAnthropicthinking 및 tool_choice에 대한 어댑터 적용을 포함한 네이티브 /v1/messages 경로
Codex CLISupported with model/path limitsOpenAI ResponsesCodex 전용 워크플로우를 위한 고급 경로로 /v1/responses를 취급; 일부 Responses 전용 필드는 모든 모델과 라우팅 경로에서 보장되지 않습니다
Gemini CLIBest-effort / experimentalGeminiCustom LemonData base URL 흐름은 안정적인 업스트림 계약이 아닙니다
OpenCodeSupportedOpenAI-compatible기본적으로 OpenAI 호환 제공자를 사용하십시오; 명시적으로 필요할 때만 Responses 기반 제공자로 전환하십시오
다른 OpenAI 호환 편집기 및 에이전트 도구들도 동일한 기본 URL 패턴에서 작동하는 경우가 많지만, 이 리포지토리는 현재 Windsurf, Aider, Continue.dev, Cline/Roo Code, GitHub Copilot 등 유사 클라이언트에 대한 도구별 회귀(regression) 테스트 커버리지를 유지하고 있지 않습니다.

구성 예시

Base URL: https://api.lemondata.cc/v1
API Key: sk-your-lemondata-key
Cursor는 내부적으로 Anthropic 스타일의 도구 형식을 사용합니다. LemonData는 다음 두 형식을 모두 지원합니다:
  • OpenAI format: { type: "function", function: { name, parameters } }
  • Anthropic format: { name, input_schema } (no type field)

SDK 호환성

문서화된 SDK & 프레임워크 경로

SDK / FrameworkLanguageSupport LevelNotes
OpenAI SDKPython/JS/GoSupported core pathChat Completions 및 Embeddings가 기본 문서화된 경로입니다; 일부 Responses 전용 필드는 모든 모델과 라우팅 경로에서 보장되지 않습니다
Anthropic SDKPython/JSStrong native path도구, thinking, 프롬프트 캐싱에 대한 직접 증거가 있는 네이티브 Messages 경로
Vercel AI SDKTypeScriptRecommended integration pattern@ai-sdk/openai-compatible를 선호하십시오; Responses-네이티브 동작이 명시적으로 필요할 때만 @ai-sdk/openai를 사용하십시오
LangChainPython/JSSupported standard surfacesChatOpenAIOpenAIEmbeddings가 의도된 범위입니다; 벤더 네이티브 확장은 범위에서 제외됩니다
LlamaIndexPythonSupported via OpenAILikeLemonData와 같은 서드파티 게이트웨이에는 내장 OpenAI 클래스가 아닌 OpenAILike를 사용하십시오
Dify-Supported with scope limitsOpenAI 제공자 및 chat-completions 지향 흐름이 의도된 경로입니다; Codex 전용 Responses 또는 WebSocket 동작에는 적합하지 않습니다

Chat Completions 매개변수

핵심 매개변수

ParameterTypeDescription
modelstringModel identifier (required)
messagesarrayConversation messages (required)
max_tokensintegerMaximum output tokens
temperaturenumberSampling temperature (0-2)
top_pnumberNucleus sampling (0-1)
streambooleanEnable streaming

도구 호출

{
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "get_weather",
        "description": "Get weather for a location",
        "parameters": {
          "type": "object",
          "properties": {
            "location": { "type": "string" }
          }
        },
        "strict": true
      }
    }
  ],
  "tool_choice": "auto",
  "parallel_tool_calls": true
}

Tool Choice 옵션

FormatExampleDescription
String"auto", "none", "required"단순 선택
OpenAI Object{ "type": "function", "function": { "name": "fn" } }특정 함수 강제 지정
Anthropic Object{ "type": "tool", "name": "fn", "disable_parallel_tool_use": true }Anthropic 네이티브 형식

고급 매개변수

ParameterTypeDescription
stream_optionsobject{ include_usage: true } for token counts
reasoning_effortstring"low", "medium", "high" for reasoning-enabled GPT-5 models
service_tierstring"auto" or "default"
seedintegerDeterministic outputs
logprobsbooleanReturn log probabilities
top_logprobsintegerNumber of top logprobs (0-20)
logit_biasobjectToken bias map (-100 to 100)
frequency_penaltynumberRepetition penalty (-2 to 2)
presence_penaltynumberTopic penalty (-2 to 2)
stopstring/arrayStop sequences
nintegerNumber of completions (1-128)
userstringUser identifier for tracking

OpenAI 고급 기능

ParameterTypeDescription
modalitiesarray["text", "audio"] for multimodal
audioobjectAudio output config (voice, format)
predictionobjectPredicted output for faster completion
metadataobjectKey-value pairs for tracking
storebooleanStore for later retrieval

제공자별 옵션

{
  "anthropic_options": {
    "thinking": {
      "type": "enabled",
      "budget_tokens": 10000
    },
    "prompt_caching": true
  },
  "google_options": {
    "safety_settings": [...],
    "google_search": true,
    "code_execution": true
  }
}

Anthropic Messages 매개변수

핵심 매개변수

ParameterTypeDescription
modelstringModel identifier
messagesarrayConversation messages
max_tokensintegerMaximum output (up to 128000)
systemstring/arraySystem prompt
streambooleanEnable streaming

도구 호출

{
  "tools": [
    {
      "name": "get_weather",
      "description": "Get weather",
      "input_schema": {
        "type": "object",
        "properties": {
          "location": { "type": "string" }
        }
      }
    }
  ],
  "tool_choice": {
    "type": "auto",
    "disable_parallel_tool_use": false
  }
}

확장된 Thinking

{
  "model": "claude-opus-4-6",
  "thinking": {
    "type": "enabled",
    "budget_tokens": 10000
  }
}

Responses API 매개변수

핵심 매개변수

ParameterTypeDescription
modelstringModel identifier
inputstring/arrayInput content
instructionsstringSystem instructions
max_output_tokensintegerMaximum output tokens
previous_response_idstringContinue conversation

고급 매개변수

ParameterTypeDescription
truncation_strategystring"auto" or "disabled"
includearray["reasoning.encrypted_content"]
reasoning_effortstringFor reasoning models
service_tierstringPriority tier

도구 형식

OpenAI 및 Anthropic 도구 형식을 모두 지원합니다:
// OpenAI format
{ "type": "function", "name": "fn", "parameters": {...} }

// Anthropic format (Cursor compatibility)
{ "name": "fn", "input_schema": {...} }

Gemini API 매개변수

핵심 매개변수

ParameterTypeDescription
contentsarrayConversation content
systemInstructionobjectSystem prompt
generationConfigobjectGeneration settings

도구

{
  "tools": [{
    "functionDeclarations": [{
      "name": "search",
      "description": "Search the web",
      "parameters": {...}
    }],
    "codeExecution": {},
    "googleSearch": {}
  }],
  "toolConfig": {
    "functionCallingConfig": {
      "mode": "AUTO"
    }
  }
}

안전 설정

{
  "safetySettings": [
    {
      "category": "HARM_CATEGORY_HARASSMENT",
      "threshold": "BLOCK_MEDIUM_AND_ABOVE"
    }
  ]
}

추가 매개변수

ParameterTypeDescription
cachedContentstringCached content reference
responseMimeTypestring"text/plain" or "application/json"
responseSchemaobjectJSON schema for structured output

스트리밍

모든 엔드포인트는 Server-Sent Events (SSE) 스트리밍을 지원합니다:
# Chat Completions
curl https://api.lemondata.cc/v1/chat/completions \
  -H "Authorization: Bearer sk-xxx" \
  -d '{"model": "gpt-4o", "messages": [...], "stream": true}'

# With usage tracking
-d '{"...", "stream_options": {"include_usage": true}}'

오류 처리

LemonData는 OpenAI 호환 오류 응답을 반환합니다:
{
  "error": {
    "message": "Invalid API key",
    "type": "invalid_api_key",
    "code": "invalid_api_key"
  }
}
자세한 내용은 Error Handling Guide를 참조하십시오.

권장 모범 사례

모든 스키마는 .passthrough()를 사용합니다 - 알 수 없는 매개변수는 업스트림 제공자로 전달됩니다.
스트리밍 응답의 정확한 토큰 수를 위해 stream_options.include_usage를 활성화하십시오.
SDK가 예상하는 형식에 맞추십시오. LemonData는 OpenAI 및 Anthropic 형식 둘 다를 허용합니다.