POST
/
sdk
/
v1
/
prompts
/
{id}
curl --request POST \
  --url https://api.promptfoundry.ai/sdk/v1/prompts/{id} \
  --header 'Content-Type: application/json'
{
  "provider": "anthropic",
  "name": "<string>",
  "parameters": {
    "max_tokens": 123,
    "messages": [
      {
        "content": "<string>",
        "role": "user"
      }
    ],
    "model": "<string>",
    "metadata": {
      "user_id": "<string>"
    },
    "stop_sequences": [
      "<string>"
    ],
    "stream": true,
    "system": "<string>",
    "temperature": 123,
    "tool_choice": {
      "type": "auto"
    },
    "tools": [
      {
        "input_schema": {
          "type": "object",
          "properties": "<any>"
        },
        "name": "<string>",
        "description": "<string>"
      }
    ],
    "top_k": 123,
    "top_p": 123
  }
}

Path Parameters

id
string
required

Body

application/json
variables
object

The template variables added to the prompt when executing the prompt.

overrideMessages
object[]

Replaces the configured prompt messages when running the prompt.

appendMessages
object[]

Appended the the end of the configured prompt messages before running the prompt.

user
string

A unique identifier representing your end-user, which can help monitor and detect abuse.

Response

200 - application/json
provider
enum<string>
required
Available options:
anthropic
name
string
required
parameters
object
required