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: <api-key>' \
  --data '
{
  "name": "<string>",
  "tool_definition": {},
  "folder_id": 123,
  "commit_message": "<string>",
  "external_ids": [
    {
      "source": "<string>",
      "external_id": "<string>"
    }
  ]
}
'
{
  "external_ids": [
    {
      "source": "<string>",
      "external_id": "<string>"
    }
  ],
  "success": true,
  "tool_registry": {},
  "version": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.promptlayer.com/llms.txt

Use this file to discover all available pages before exploring further.

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.

Authorizations

X-API-KEY
string
header
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

external_ids
ExternalId · object[]

Identifiers from other systems.

Response

Tool created

external_ids
ExternalId · object[]
required

External ID mappings for the tool.

success
boolean
tool_registry
object
version
object