4e064cf81dae

latestOpenAPI 3.1.02026-08-131831,331960.0 KB
prompts

Create a prompt version

Create a new version of a prompt. Use {{variable_name}} syntax in messages to define template variables.

post/api/prompts/{prompt_id}/versions/

Path parameters

prompt_idstring required

The unique prompt identifier.

Headers

Authorizationstring required

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.

Request body

descriptionstring

Version description.

thinkingApiPromptsPromptIdVersionsPostRequestBodyContentApplicationJsonSchemaThinking

Optional provider-specific reasoning configuration.

modelstring

Primary model for this version.

streamboolean

Whether to stream responses.

temperaturenumber double

Sampling temperature (0-2).

max_tokensinteger

Maximum tokens to generate.

top_pnumber double

Nucleus sampling parameter.

frequency_penaltynumber double

Frequency penalty (-2 to 2).

presence_penaltynumber double

Presence penalty (-2 to 2).

reasoning_effortstring nullable
verbositystring nullable
seedinteger nullable
variablesApiPromptsPromptIdVersionsPostRequestBodyContentApplicationJsonSchemaVariables

Template variables and their default values.

fallback_modelsstring[]

Fallback models if the primary model fails.

load_balance_modelsApiPromptsPromptIdVersionsPostRequestBodyContentApplicationJsonSchemaLoadBalanceModelsItems[]

Weighted load-balancing model configuration.

toolsApiPromptsPromptIdVersionsPostRequestBodyContentApplicationJsonSchemaToolsItems[]

Tools available to the model.

response_formatApiPromptsPromptIdVersionsPostRequestBodyContentApplicationJsonSchemaResponseFormat

Structured output / response format configuration.

json_schemaApiPromptsPromptIdVersionsPostRequestBodyContentApplicationJsonSchemaJsonSchema

JSON schema used for structured outputs when configured.

is_enforcing_response_formatboolean

Whether to strictly enforce the response format.

deployboolean

Deploy this version as the live version immediately.

Response

Prompt version created successfully.

idstring
prompt_version_idstring
versioninteger
descriptionstring nullable
messagesobject[]
thinkingApiPromptsPromptIdVersionsPostResponsesContentApplicationJsonSchemaThinking
modelstring
streamboolean
temperaturenumber double nullable
max_tokensinteger nullable
top_pnumber double nullable
frequency_penaltynumber double nullable
presence_penaltynumber double nullable
reasoning_effortstring nullable
verbositystring nullable
seedinteger nullable
variablesApiPromptsPromptIdVersionsPostResponsesContentApplicationJsonSchemaVariables
fallback_modelsstring[] nullable
load_balance_modelsApiPromptsPromptIdVersionsPostResponsesContentApplicationJsonSchemaLoadBalanceModelsItems[] nullable
toolsApiPromptsPromptIdVersionsPostResponsesContentApplicationJsonSchemaToolsItems[] nullable
response_formatApiPromptsPromptIdVersionsPostResponsesContentApplicationJsonSchemaResponseFormat
json_schemaApiPromptsPromptIdVersionsPostResponsesContentApplicationJsonSchemaJsonSchema
is_enforcing_response_formatboolean
readonlyboolean
is_deployedboolean
created_atstring date-time
updated_atstring date-time