Create a response
Send an input and receive a response object, OpenAI's newer alternative to chat completions.
/responsesSend an input and receive a response object, OpenAI's newer alternative to chat completions.
input is a string, or a list of messages whose content parts can be
text, or a file or image you uploaded, referred to by file_id. The
answer arrives as a list of output items rather than a single message,
and token counts use input_tokens / output_tokens instead of
prompt_tokens / completion_tokens. Use it when your client is already
built on the Responses API; otherwise
/chat/completions is the shorter
path and is the only endpoint that returns Olive's reasoning as a
separate field.
Set store: true to keep the response, then continue the conversation
by sending only the new input with previous_response_id. A stored
response keeps its full input, including the text of any file you sent as
input_file, until you delete it. Deleting the file does not remove that
copy. Delete the response with
DELETE /responses/{response_id}.
tools accepts function tools, which your code runs, and
file_search over your vector stores.
Any other tool type is refused with 400. background,
context_management and reasoning.summary are also refused with 400.
If generation stops at max_output_tokens, the response comes back with
status: "incomplete" and the text produced so far. Check status
before you use the answer.
To shrink a long conversation, see
POST /responses/compact. To count
input tokens before you send, see
POST /responses/input_tokens.
Authorization
BearerAuth Your Avey API key, sent as Authorization: Bearer <key>. This is the header the OpenAI SDKs already send, so pass the key as the client's ordinary api_key and no further configuration is needed.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
The body of a Responses API request.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl https://api.avey.ai/llm/responses \ -H "Authorization: Bearer $AVEY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "olive", "input": "Summarize this discharge note in plain language:" }'{ "id": "resp_5c7a2e1f8b3d4a609e1c7f2b4d8a6e30", "object": "response", "created_at": 1769904000, "status": "completed", "incomplete_details": null, "model": "olive", "output": [ { "type": "message", "role": "assistant", "content": [ { "type": "output_text", "text": "You were treated for a chest infection and are going home on a five-day course of antibiotics.", "annotations": [] } ] } ], "usage": { "input_tokens": 38, "output_tokens": 274, "total_tokens": 312 }}