curl --request POST \
--url 'https://api.orq.ai/v2/agents/customer_support/responses' \
--header 'Authorization: Bearer $ORQ_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"message": {
"role": "user",
"parts": [
{
"kind": "text",
"text": "Hi! I am testing your capabilities. Can you describe what you can do?"
}
]
}
}'{
"_id": "<string>",
"task_id": "<string>",
"output": [
{
"messageId": "<string>",
"role": "user",
"parts": [
{
"kind": "text",
"text": "<string>"
}
],
"metadata": {}
}
],
"created_at": "<string>",
"model": "<string>",
"usage": {
"completion_tokens": 123,
"prompt_tokens": 123,
"total_tokens": 123,
"prompt_tokens_details": {
"cached_tokens": 123,
"cache_creation_tokens": 123,
"audio_tokens": 123
},
"completion_tokens_details": {
"reasoning_tokens": 123,
"accepted_prediction_tokens": 123,
"rejected_prediction_tokens": 123,
"audio_tokens": 123
}
}
}Initiates an agent conversation and returns a complete response. This endpoint manages the full lifecycle of an agent interaction, from receiving the initial message through all processing steps until completion. Supports synchronous execution (waits for completion) and asynchronous execution (returns immediately with task ID). The response includes all messages exchanged, tool calls made, and token usage statistics. Ideal for request-response patterns where you need the complete interaction result.
curl --request POST \
--url 'https://api.orq.ai/v2/agents/customer_support/responses' \
--header 'Authorization: Bearer $ORQ_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"message": {
"role": "user",
"parts": [
{
"kind": "text",
"text": "Hi! I am testing your capabilities. Can you describe what you can do?"
}
]
}
}'{
"_id": "<string>",
"task_id": "<string>",
"output": [
{
"messageId": "<string>",
"role": "user",
"parts": [
{
"kind": "text",
"text": "<string>"
}
],
"metadata": {}
}
],
"created_at": "<string>",
"model": "<string>",
"usage": {
"completion_tokens": 123,
"prompt_tokens": 123,
"total_tokens": 123,
"prompt_tokens_details": {
"cached_tokens": 123,
"cache_creation_tokens": 123,
"audio_tokens": 123
},
"completion_tokens_details": {
"reasoning_tokens": 123,
"accepted_prediction_tokens": 123,
"rejected_prediction_tokens": 123,
"audio_tokens": 123
}
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The unique key of identifier of the agent to invoke
The A2A message to send to the agent (user input or tool results)
Show child attributes
Message role (user or tool for continuing executions)
user A2A message parts (text, file, or tool_result only)
Message part that can be provided by users. Use "text" for regular messages, "file" for attachments, or "tool_result" when responding to tool call requests.
Optional A2A message ID in ULID format
Optional task ID to continue an existing agent execution. When provided, the agent will continue the conversation from the existing task state. The task must be in an inactive state to continue.
Information about the contact making the request. If the contact does not exist, it will be created automatically.
Show child attributes
Unique identifier for the contact
"contact_01ARZ3NDEKTSV4RRFFQ69G5FAV"
Display name of the contact
"Jane Doe"
Email address of the contact
URL to the contact's avatar or logo
"https://example.com/avatars/jane-doe.jpg"
A list of tags associated with the contact
["hr", "engineering"]
Thread information to group related requests
Memory configuration for the agent execution. Used to associate memory stores with specific entities like users or sessions.
Show child attributes
An entity ID used to link memory stores to a specific user, session, or conversation. This ID is used to isolate and retrieve memories specific to the entity across agent executions.
If true, returns immediately without waiting for completion. If false (default), waits until the agent becomes inactive or errors.
If true, returns Server-Sent Events (SSE) streaming response with real-time events. If false (default), returns standard JSON response.
Agent response successfully created and completed. Returns the full conversation including all messages, tool interactions, model used, and token usage statistics. In background mode, returns immediately with initial task details. In streaming mode, returns Server-Sent Events (SSE) with real-time events.
The unique response ID
The agent execution task ID
Array of messages from the agent execution
Show child attributes
user, agent, tool, system ISO timestamp of response creation
Model used in provider/model format
Token usage from the agent execution
Show child attributes
Number of tokens in the generated completion.
Number of tokens in the prompt.
Total number of tokens used in the request (prompt + completion).
Show child attributes
The number of audio output tokens produced by the response.
Was this page helpful?