Skip to main content
POST
/
v1
/
tools
Create a custom tool
curl --request POST \
  --url https://api.pyai.com/v1/tools \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "input_schema": {},
  "webhook_url": "<string>",
  "timeout_ms": 5000
}
'
{
  "object": "tool",
  "id": "<string>",
  "org_id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "input_schema": {},
  "webhook_url": "<string>",
  "timeout_ms": 123,
  "created_at": 123,
  "hmac_secret": "<string>"
}

Authorizations

Authorization
string
header
required

Use Authorization: Bearer pyai_live_... (or pyai_test_...).

Body

application/json
name
string
required
description
string
input_schema
object
webhook_url
string<uri>

HTTPS endpoint for engine-POST mode.

side_effect
enum<string>
Available options:
read,
action
timeout_ms
integer
default:5000
Required range: 100 <= x <= 15000

Response

Created tool

object
string
Example:

"tool"

id
string
org_id
string | null
name
string
kind
enum<string>
Available options:
prebuilt,
custom
description
string
input_schema
object
webhook_url
string | null
side_effect
enum<string>
Available options:
read,
action
timeout_ms
integer
status
enum<string>
Available options:
active,
disabled
created_at
integer
hmac_secret
string

Returned once at creation for webhook signature verification.