Skip to main content
POST
/
console
/
v1
/
prompts
/
{id}
/
versions
Create Prompt Version
curl --request POST \
  --url https://statsigapi.net/console/v1/prompts/{id}/versions \
  --header 'Content-Type: application/json' \
  --header 'STATSIG-API-KEY: <api-key>' \
  --data '{
  "prompts": [
    {
      "content": "<string>",
      "role": "system"
    }
  ],
  "temperature": 123,
  "model": "<string>",
  "name": "my_config",
  "provider": "<string>",
  "workflow_body": {
    "type": "JSON",
    "value": "<string>"
  },
  "workflow_headers": [
    {
      "name": "<string>",
      "value": "<string>"
    }
  ],
  "auth_workflow_headers": [
    {
      "name": "<string>",
      "value": "<string>"
    }
  ],
  "eval_model": "<string>",
  "top_p": 123,
  "frequency_penalty": 123,
  "presence_penalty": 123,
  "max_tokens": 123,
  "id": "<string>",
  "description": "<string>"
}'
{
  "message": "<string>",
  "data": {
    "prompts": [
      {
        "content": "<string>",
        "role": "system"
      }
    ],
    "temperature": 123,
    "model": "<string>",
    "name": "my_config",
    "provider": "<string>",
    "workflow_body": {
      "type": "JSON",
      "value": "<string>"
    },
    "workflow_headers": [
      {
        "name": "<string>",
        "value": "<string>"
      }
    ],
    "auth_workflow_headers": [
      {
        "name": "<string>",
        "value": "<string>"
      }
    ],
    "eval_model": "<string>",
    "top_p": 123,
    "frequency_penalty": 123,
    "presence_penalty": 123,
    "max_tokens": 123,
    "id": "<string>",
    "description": "<string>"
  }
}

Authorizations

STATSIG-API-KEY
string
header
required

Headers

x-respect-review-settings
string

Optional header to respect review settings for mutation endpoints.

Path Parameters

id
string
required

id

Body

application/json
name
string
required

The Prompt Version display name

Required string length: 3 - 100
Example:

"my_config"

prompts
object[]
temperature
number
model
string
provider
string
workflow_body
object
workflow_headers
object[]
auth_workflow_headers
object[]
eval_model
string
top_p
number
frequency_penalty
number
presence_penalty
number
max_tokens
number
id
string

The Prompt Version name ID

Required string length: 3 - 100
description
string
Maximum length: 1000

Response

201 - application/json

Create Prompt Version

message
string
required

A simple string explaining the result of the operation.

data
object
required

A single result.

I