Create Prompt Version

Create a Draft version. It starts as a copy of the Live version's prompts , model , provider , temperature , top p , frequency penalty , presence penalty , m…

Create a Draft version. It starts as a copy of the Live version's prompts, model, provider, temperature, top_p, frequency_penalty, presence_penalty, max_tokens, eval_model and workflow settings. Fields you send replace the copied values. A prompt without a Live version starts from a temperature of 1 and max_tokens of 4,096.

posthttps://statsigapi.net/console/v1/prompts/{id}/versions

Authorizations

STATSIG-API-KEYstringrequired

apiKey (header)

Path parameters

idstringrequired

id

Body

application/json
promptsobject[]
Show child attributes
contentstringrequired
rolestringrequired
Allowed values:systemuserassistant
temperaturenumber
Constraints:format: double
namestringrequired

The Prompt Version display name

Example:my_config
Constraints:min length: 3max length: 100pattern: ^[a-zA-Z0-9_\-. ]*$
workflow_bodyobject
Show child attributes
typestringrequired
Allowed values:JSON
valuestringrequired
workflow_urlstring

Offline-eval workflow URL. Empty or null removes it. Changing it clears the stored workflow_headers and auth_workflow_headers unless they are sent in the same request.

Constraints:nullable
workflow_headersobject[]

Headers sent with each workflow request. Replaces the stored list when present.

Show child attributes
namestringrequired
valuestringrequired
auth_workflow_headersobject[]

Secret headers sent with each workflow request, such as an API key. Replaces the stored list when present, so send every header with its value. Statsig doesn't return them.

Show child attributes
namestringrequired
valuestringrequired
top_pnumber
Constraints:format: double
frequency_penaltynumber
Constraints:format: double
presence_penaltynumber
Constraints:format: double
max_tokensnumber

Most tokens a completion can generate: a whole number from 1 to the model's output limit. A higher value returns a 400. Without your own API key for provider, Start Prompt Version Evaluation Job also returns a 400 when max_tokens is above 16,384.

Constraints:format: double
idstring

The Prompt Version name ID

Constraints:min length: 3max length: 100pattern: ^[a-zA-Z0-9_\-.]*$
descriptionstring
Constraints:max length: 1000
Other properties3
modelstring
providerstring
eval_modelstring

Response

application/json
201· Create Prompt Version
messagestringrequired

A simple string explaining the result of the operation.

dataobjectrequired
Show child attributes
idstringrequired
Constraints:min length: 3max length: 100
namestringrequired
Constraints:min length: 3max length: 100
typestring

Live is served to users; Candidate is served to code for shadow runs; Draft and Archive are not served.

Allowed values:LiveCandidateArchiveDraft
versionnumber
Constraints:format: double
promptsobject[]
rolestringrequired
contentstringrequired
modelstring
providerstring
eval_modelstring
temperaturenumber
Constraints:format: double
top_pnumber
Constraints:format: double
max_tokensnumber
Constraints:format: double
frequency_penaltynumber
Constraints:format: double
presence_penaltynumber
Constraints:format: double
workflow_urlstring
Constraints:nullable
createdTimenumber
Constraints:format: double
lastModifiedTimenumber
Constraints:format: double
eval_run_idstring

Set only by Start Prompt Version Evaluation Job: the eval run it started. Poll it with List Prompt Version Eval Runs.

Was this helpful?

For AI agents: a documentation index is available at /llms.txt. Append .md to any page URL for markdown, or send Accept: text/markdown.