Retrieve prompt version
Retrieves a specific version of a prompt by version number.
```Python Python
import requests
url = "https://api.respan.ai/api/prompts/{prompt_id}/versions/{version}/"
api_key = "YOUR_RESPAN_API_KEY"
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
print(response.json())
```
```TypeScript TypeScript
fetch('https://api.respan.ai/api/prompts/{prompt_id}/versions/{version}/', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_RESPAN_API_KEY'
}
})
.then(response => response.json())
.then(data => console.log(data));
```
Authentication
AuthorizationBearer
API key authentication. Get your API key from https://platform.respan.ai/platform/api-keys
Path parameters
prompt_id
The unique prompt identifier
version
The version number
Response
Prompt version details
Errors
401
Unauthorized Error
404
Not Found Error