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": {},
"functions": [
{}
],
"tools": [
{}
],
"tool_choice": {},
"model": "<string>",
"virtual_key": "<string>",
"version_description": "<string>",
"template_metadata": {}
}'
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object": "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": {},
"functions": [
{}
],
"tools": [
{}
],
"tool_choice": {},
"model": "<string>",
"virtual_key": "<string>",
"version_description": "<string>",
"template_metadata": {}
}'
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object": "prompt"
}
Prompt created successfully
The response is of type object
.
Was this page helpful?