Get a prompt version
https://api.respan.ai/api/prompts/{prompt_id}/versions/{version}/Servers
https://api.respan.ai: Respan API Server
Authentication
RespanApiKey
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.
HTTP scheme: bearer; format: Respan API key.
Authorization: Bearer $RESPAN_API_KEYOr:
DashboardJwt
Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.
HTTP scheme: bearer; format: Dashboard JWT.
Authorization: Bearer $RESPAN_DASHBOARD_JWTPath parameters
prompt_id string Requiredversion integer RequiredExample:
3Responses
200
Prompt version details.
application/json
$ object Body
{"id":"pv_abc123","prompt_version_id":"pv_abc123","version":3,"description":"Added context variable","messages":[{"role":"system","content":"You are a helpful assistant. Context: {{context}}"},{"role":"user","content":"{{user_query}}"}],"thinking":null,"model":"gpt-4o","stream":false,"temperature":0.7,"max_tokens":2048,"top_p":1,"frequency_penalty":0,"presence_penalty":0,"reasoning_effort":null,"verbosity":null,"seed":null,"variables":{"context":"","user_query":""},"tools":[{"type":"function","function":{"name":"search_knowledge_base"}}],"tool_choice":"auto","response_format":null,"json_schema":null,"is_enforcing_response_format":false,"readonly":false,"is_deployed":false,"edited_by":{"id":123,"email":"user@example.com","first_name":"John","last_name":"Doe"},"created_at":"2026-01-20T10:30:00Z","updated_at":"2026-01-20T10:30:00Z"}id string Optionalprompt_version_id string Optionalversion integer Optionaldescription string or null Optionalmessages array<object> Optional
messages[] object Array itemrole and content.Additional properties are allowed
thinking object or null Optionalmodel string Optionalstream boolean Optionaltemperature number or null Optionalmax_tokens integer or null Optionaltop_p number or null Optionalfrequency_penalty number or null Optionalpresence_penalty number or null Optionalreasoning_effort string or null Optionalverbosity string or null Optionalseed integer or null Optionalvariables object Optionaltools array<object> or null Optional
tools[] object Array itemtool_choice string or null or object Optional
tool_choice (oneOf 1) string or null Schema varianttool_choice (oneOf 2) object Schema variantresponse_format object or null Optionaljson_schema object or null Optionalis_enforcing_response_format boolean Optionalreadonly boolean Optionaledited_by object Optional
edited_by.id integer Optionaledited_by.email string Optionaledited_by.first_name string Optionaledited_by.last_name string Optionalcreated_at string Optionaldate-timeupdated_at string Optionaldate-timeOpenAPI response schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"prompt_version_id": {
"type": "string"
},
"version": {
"type": "integer"
},
"description": {
"type": "string",
"nullable": true
},
"messages": {
"type": "array",
"items": {
"type": "object",
"description": "Message object with at least `role` and `content`.",
"additionalProperties": true
}
},
"thinking": {
"type": "object",
"nullable": true
},
"model": {
"type": "string"
},
"stream": {
"type": "boolean"
},
"temperature": {
"type": "number",
"nullable": true
},
"max_tokens": {
"type": "integer",
"nullable": true
},
"top_p": {
"type": "number",
"nullable": true
},
"frequency_penalty": {
"type": "number",
"nullable": true
},
"presence_penalty": {
"type": "number",
"nullable": true
},
"reasoning_effort": {
"type": "string",
"nullable": true
},
"verbosity": {
"type": "string",
"nullable": true
},
"seed": {
"type": "integer",
"nullable": true
},
"variables": {
"type": "object"
},
"tools": {
"type": "array",
"items": {
"type": "object"
},
"nullable": true
},
"tool_choice": {
"oneOf": [
{
"type": "string",
"nullable": true
},
{
"type": "object"
}
]
},
"response_format": {
"type": "object",
"nullable": true
},
"json_schema": {
"type": "object",
"nullable": true
},
"is_enforcing_response_format": {
"type": "boolean"
},
"readonly": {
"type": "boolean"
},
"edited_by": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"email": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
}
}
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"example": {
"id": "pv_abc123",
"prompt_version_id": "pv_abc123",
"version": 3,
"description": "Added context variable",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant. Context: {{context}}"
},
{
"role": "user",
"content": "{{user_query}}"
}
],
"thinking": null,
"model": "gpt-4o",
"stream": false,
"temperature": 0.7,
"max_tokens": 2048,
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 0,
"reasoning_effort": null,
"verbosity": null,
"seed": null,
"variables": {
"context": "",
"user_query": ""
},
"tools": [
{
"type": "function",
"function": {
"name": "search_knowledge_base"
}
}
],
"tool_choice": "auto",
"response_format": null,
"json_schema": null,
"is_enforcing_response_format": false,
"readonly": false,
"is_deployed": false,
"edited_by": {
"id": 123,
"email": "user@example.com",
"first_name": "John",
"last_name": "Doe"
},
"created_at": "2026-01-20T10:30:00Z",
"updated_at": "2026-01-20T10:30:00Z"
}
}403
The API key is missing, invalid or expired.
application/json
$ object Body
detail string Required in parentOpenAPI response schema
{
"type": "object",
"required": [
"detail"
],
"properties": {
"detail": {
"type": "string"
}
}
}Example
{
"detail": "Your API key is invalid or expired, please check your API key in the platform settings."
}404
Version not found
application/json
$ object Body
detail string Required in parentOpenAPI response schema
{
"type": "object",
"required": [
"detail"
],
"properties": {
"detail": {
"type": "string"
}
}
}Example
{
"detail": "No PromptVersion matches the given query."
}OpenAPI source
The operation and referenced components below retain the complete OpenAPI definitions, including constraints and examples.
OpenAPI operation
{
"summary": "Get a prompt version",
"operationId": "retrievePromptVersion",
"tags": [
"Prompts"
],
"parameters": [
{
"name": "prompt_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The unique prompt identifier."
},
{
"name": "version",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"description": "The prompt version number.",
"example": 3
}
],
"responses": {
"200": {
"description": "Prompt version details.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"prompt_version_id": {
"type": "string"
},
"version": {
"type": "integer"
},
"description": {
"type": "string",
"nullable": true
},
"messages": {
"type": "array",
"items": {
"type": "object",
"description": "Message object with at least `role` and `content`.",
"additionalProperties": true
}
},
"thinking": {
"type": "object",
"nullable": true
},
"model": {
"type": "string"
},
"stream": {
"type": "boolean"
},
"temperature": {
"type": "number",
"nullable": true
},
"max_tokens": {
"type": "integer",
"nullable": true
},
"top_p": {
"type": "number",
"nullable": true
},
"frequency_penalty": {
"type": "number",
"nullable": true
},
"presence_penalty": {
"type": "number",
"nullable": true
},
"reasoning_effort": {
"type": "string",
"nullable": true
},
"verbosity": {
"type": "string",
"nullable": true
},
"seed": {
"type": "integer",
"nullable": true
},
"variables": {
"type": "object"
},
"tools": {
"type": "array",
"items": {
"type": "object"
},
"nullable": true
},
"tool_choice": {
"oneOf": [
{
"type": "string",
"nullable": true
},
{
"type": "object"
}
]
},
"response_format": {
"type": "object",
"nullable": true
},
"json_schema": {
"type": "object",
"nullable": true
},
"is_enforcing_response_format": {
"type": "boolean"
},
"readonly": {
"type": "boolean"
},
"edited_by": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"email": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
}
}
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"example": {
"id": "pv_abc123",
"prompt_version_id": "pv_abc123",
"version": 3,
"description": "Added context variable",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant. Context: {{context}}"
},
{
"role": "user",
"content": "{{user_query}}"
}
],
"thinking": null,
"model": "gpt-4o",
"stream": false,
"temperature": 0.7,
"max_tokens": 2048,
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 0,
"reasoning_effort": null,
"verbosity": null,
"seed": null,
"variables": {
"context": "",
"user_query": ""
},
"tools": [
{
"type": "function",
"function": {
"name": "search_knowledge_base"
}
}
],
"tool_choice": "auto",
"response_format": null,
"json_schema": null,
"is_enforcing_response_format": false,
"readonly": false,
"is_deployed": false,
"edited_by": {
"id": 123,
"email": "user@example.com",
"first_name": "John",
"last_name": "Doe"
},
"created_at": "2026-01-20T10:30:00Z",
"updated_at": "2026-01-20T10:30:00Z"
}
}
}
}
},
"403": {
"$ref": "#/components/responses/InvalidApiKey"
},
"404": {
"description": "Version not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"detail"
],
"properties": {
"detail": {
"type": "string"
}
}
},
"example": {
"detail": "No PromptVersion matches the given query."
}
}
}
}
},
"security": [
{
"RespanApiKey": []
},
{
"DashboardJwt": []
}
]
}OpenAPI path metadata
{}Referenced OpenAPI components
{
"responses": {
"InvalidApiKey": {
"description": "The API key is missing, invalid or expired.",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"detail"
],
"properties": {
"detail": {
"type": "string"
}
}
},
"example": {
"detail": "Your API key is invalid or expired, please check your API key in the platform settings."
}
}
}
}
},
"securitySchemes": {
"DashboardJwt": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "Dashboard JWT",
"description": "Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.",
"x-fern-bearer": {
"name": "dashboardJwt",
"env": "RESPAN_DASHBOARD_JWT"
}
},
"RespanApiKey": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "Respan API key",
"description": "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.",
"x-fern-bearer": {
"name": "respanApiKey",
"env": "RESPAN_API_KEY"
}
}
}
}