Skip to main content
POST
/
v1
/
responses
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
  }
}
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.

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
  }
}