Create a new prompt
curl --request POST \
--url https://api.portkey.ai/v1/prompts \
--header 'Content-Type: application/json' \
--header 'x-portkey-api-key: <api-key>' \
--data '
{
"name": "<string>",
"collection_id": "<string>",
"string": "<string>",
"parameters": {},
"virtual_key": "<string>",
"functions": [
{}
],
"tools": [
{}
],
"tool_choice": {},
"model": "<string>",
"version_description": "<string>",
"template_metadata": {}
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Create Prompt
POST
/
prompts
Create a new prompt
curl --request POST \
--url https://api.portkey.ai/v1/prompts \
--header 'Content-Type: application/json' \
--header 'x-portkey-api-key: <api-key>' \
--data '
{
"name": "<string>",
"collection_id": "<string>",
"string": "<string>",
"parameters": {},
"virtual_key": "<string>",
"functions": [
{}
],
"tools": [
{}
],
"tool_choice": {},
"model": "<string>",
"version_description": "<string>",
"template_metadata": {}
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Documentation Index
Fetch the complete documentation index at: https://portkey-docs-feat-byteplus-provider.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Body
application/json
UUID or slug of the collection
Prompt template in string format
Parameters for the prompt
The virtual key to use for the prompt
Functions for the prompt
Tools for the prompt
Tool Choice for the prompt
The model to use for the prompt
The description of the prompt version
Metadata for the prompt
Last modified on May 24, 2026
Was this page helpful?
⌘I

