Retrieve prompt
Retrieves a specific prompt by ID, including its current version, live version, and tags.
```Python Python
import requests
url = "https://api.respan.ai/api/prompts/{prompt_id}/"
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}/', {
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
Response
Prompt details
Errors
401
Unauthorized Error
404
Not Found Error