Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.lemondata.cc/llms.txt

Use this file to discover all available pages before exploring further.

The Responses API is OpenAI’s newer stateful conversation API. LemonData supports this format as an advanced optional path for compatible models; use POST /v1/chat/completions as the default OpenAI-compatible route unless you explicitly need Responses-specific behavior.

Request Body

model
string
required
ID of the model to use. See Models for available options.
input
array
required
A list of input items comprising the conversation.Each item can be:
  • message: A conversation message with role and content
  • function_call: A function call request
  • function_call_output: Output from a function call
For multimodal input, message.content can be either a plain string or an array of content blocks. For image-capable models such as GPT-5.4 variants, pass images as input_image blocks instead of embedding URLs or Base64 strings directly into plain text.Example content blocks:
  • { "type": "input_text", "text": "Describe this image" }
  • { "type": "input_image", "image_url": "https://example.com/image.jpg" }
  • { "type": "input_image", "image_url": "data:image/png;base64,..." }
instructions
string
System instructions for the model (equivalent to system message).
max_output_tokens
integer
Maximum number of tokens to generate.
temperature
number
default:"1"
Sampling temperature between 0 and 2.
tools
array
A list of tools the model may call.For hosted image_generation tools that use the default image tool model or explicitly set model: "gpt-image-2", LemonData removes unsupported input_fidelity before forwarding the request because GPT Image 2 already treats image inputs as high fidelity. Do not send background: "transparent" for this tool; LemonData does not silently remove it because that changes output semantics.
stream
boolean
default:"false"
If true, returns a stream of events.
previous_response_id
string
ID of a previous response to continue the conversation from.
store
boolean
default:"true"
Whether to store the response for later retrieval.
metadata
object
Metadata to attach to the response for tracking purposes.
text
object
Text generation configuration options. Behavior for text.format depends on the selected model and routed path; it is not guaranteed uniformly across every model.
parallel_tool_calls
boolean
default:"true"
Whether to allow multiple tool calls in parallel.
top_p
number
Nucleus sampling parameter (0-1).
reasoning
object
Reasoning configuration for reasoning-enabled models such as GPT-5 family variants.
  • effort (string): Reasoning effort level (low, medium, high)

Response

id
string
Unique identifier for the response.
object
string
Always response.
created
integer
Unix timestamp of when the response was created.
output
array
List of output items generated by the model.
usage
object
Token usage statistics.
curl -X POST "https://api.lemondata.cc/v1/responses" \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "input": [
      {"type": "message", "role": "user", "content": "Hello!"}
    ],
    "max_output_tokens": 1000
  }'
{
  "id": "resp_abc123",
  "object": "response",
  "created": 1706000000,
  "model": "gpt-4o",
  "output": [
    {
      "type": "message",
      "role": "assistant",
      "content": [
        {"type": "text", "text": "Hello! How can I help you today?"}
      ]
    }
  ],
  "usage": {
    "input_tokens": 10,
    "output_tokens": 12,
    "total_tokens": 22
  }
}