v2
latestOpenAPI 3.1.02026-07-2670186350.6 KBcalls
Function Call
The Call endpoint is a simple interface to issue a task to an LLM. It is a declarative interface with input and output schemas that supports text, image, audio inputs and outputs and is highly model agnostic.
post/call
Request body
Example request
{
"name": "add_numbers",
"instructions": "Calculate the sum of two numbers",
"input_schema": {
"properties": {
"x": {
"title": "X",
"type": "integer"
},
"y": {
"title": "Y",
"type": "integer"
}
},
"required": [
"x",
"y"
],
"title": "OpperInputExample",
"type": "object"
},
"output_schema": {
"properties": {
"sum": {
"title": "Sum",
"type": "integer"
}
},
"required": [
"sum"
],
"title": "OpperOutputExample",
"type": "object"
},
"input": {
"x": 4,
"y": 5
},
"examples": [
{
"comment": "Adds two numbers",
"input": {
"x": 1,
"y": 3
},
"output": {
"sum": 4
}
}
],
"parent_span_id": "123e4567-e89b-12d3-a456-426614174000",
"tags": {
"project": "project_456",
"user": "company_123"
}
}Response
Successful Response
Example response
{
"message": "The sum of 1 and 3 is 4",
"cached": true,
"images": [
"image_url"
],
"usage": {
"input_tokens": 25,
"output_tokens": 972,
"output_tokens_details": {
"reasoning_tokens": 704
},
"total_tokens": 997
},
"cost": {
"generation": 0.0001,
"platform": 0.00001,
"total": 0.00011
}
}