POST
/
sdk
/
v1
/
prompts
curl --request POST \
  --url https://api.promptfoundry.ai/sdk/v1/prompts \
  --header 'Content-Type: application/json'
{
  "id": "<string>",
  "name": "<string>",
  "parameters": {
    "modelProvider": "ANTHROPIC",
    "modelName": "<string>",
    "responseFormat": "JSON",
    "temperature": 123,
    "topP": 123,
    "frequencyPenalty": 123,
    "presencePenalty": 123,
    "maxTokens": 123,
    "seed": 123,
    "toolChoice": "<string>",
    "stream": true,
    "parallelToolCalls": true
  },
  "messages": [
    {
      "content": "<string>",
      "role": "assistant",
      "toolCallId": "<string>",
      "toolCalls": [
        {
          "toolCallId": "<string>",
          "type": "function",
          "function": {
            "arguments": "<string>",
            "name": "<string>"
          }
        }
      ]
    }
  ],
  "tools": [
    {
      "id": "<string>",
      "name": "<string>",
      "description": "<string>",
      "parameters": {}
    }
  ]
}

Body

application/json
name
string
required
tools
object[]
required
messages
object[]
required
parameters
object
required

Response

201 - application/json
id
string
required

Example: "PROMPT_1"

name
string
required

Example: "Check the weather"

parameters
object
required
messages
object[]
required

The configured messages WITHOUT variables replaced.

tools
object[]
required