Skip to main content
POST
/
api
/
public
/
v2
/
tool-registry
Create Tool Registry
curl --request POST \
  --url https://api.promptlayer.com/api/public/v2/tool-registry \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <x-api-key>' \
  --data '
{
  "name": "<string>",
  "tool_definition": {},
  "folder_id": 123,
  "commit_message": "<string>"
}
'
{
  "success": true,
  "tool_registry": {},
  "version": {}
}
Create a new tool in the Tool Registry with an initial version. The tool definition should be in OpenAI function-calling format. Tool names must be unique within a workspace. The initial version is created with version number 1.

Headers

X-API-KEY
string
required

Body

application/json
name
string
required

Tool name (unique per workspace)

tool_definition
object
required

Tool definition in OpenAI function-calling format

folder_id
integer | null

Folder ID to place tool in

commit_message
string | null

Commit message for the initial version

Response

201 - application/json

Tool created

success
boolean
tool_registry
object
version
object