v2
latestOpenAPI 3.1.02026-07-2670186350.6 KBfunctions
Create Function
Create a function
post/functions
Request body
Example request
{
"name": "my-function",
"description": "This function is used to add two numbers and return the result.",
"instructions": "You are a calculator that adds two numbers and returns the result.",
"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"
}
}Response
Successful Response
Example response
{
"name": "my-function",
"description": "This function is used to add two numbers and return the result.",
"instructions": "You are a calculator that adds two numbers and returns the result.",
"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"
}
}