Skip to main content
The Responses API is OpenAI’s newer stateful conversation API. LemonData supports this format for compatible models.

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
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.
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.
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_at
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_at": 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
  }
}