cURL
curl --request GET \ --url https://api.tela.com/prompt-version
[ { "id": "<string>", "promptId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "title": "<string>", "content": "<string>", "markdownContent": "<string>", "configuration": { "model": "<string>", "temperature": 123, "type": "chat", "structuredOutput": { "enabled": true, "schema": {} } }, "variables": [ { "name": "<string>", "type": "file", "required": true, "description": "<string>", "processingOptions": { "allowMultimodal": true } } ], "promoted": true, "draft": true, "messages": { "role": "user", "content": "<string>", "index": 123 }, "createdAt": "2023-11-07T05:31:56Z", "updatedAt": "2023-11-07T05:31:56Z" } ]
Returns a list of prompt versions for a specific prompt
promptId
const promptId = 'prompt_uuid' // Build URL with query parameters const url = new URL('https://api.tela.ai/prompt-version') url.searchParams.append('promptId', promptId) const response = await fetch(url, { method: 'GET', headers: { 'Authorization': `Bearer ${process.env.TELA_API_KEY}`, 'Content-Type': 'application/json' } }) const promptVersions = await response.json() console.log(promptVersions)
[ { "id": "version_uuid", "promptId": "prompt_uuid", "title": "My Prompt Version", "content": "Prompt content...", "markdownContent": "# Markdown content...", "configuration": { "model": "claude-3-opus-20240229", "temperature": 0.7, "type": "chat" }, "variables": [ { "name": "document", "type": "file", "required": true, "description": "The document to analyze" } ], "promoted": true, "draft": false, "createdAt": "2024-04-01T12:00:00.000Z", "updatedAt": "2024-04-01T12:30:00.000Z" } ]
List of prompt versions
The response is of type object[].
object[]