For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inBook a demo
DocsReferenceChangelog
DocsReferenceChangelog
  • Introduction
    • Overview
    • Errors
  • SDK
    • Overview
    • Decorators
    • Run Evaluation
  • API
      • POSTLog to a Prompt
      • PATCHUpdate Prompt Log
      • STREAMCall Prompt
      • GETList Prompts
      • POSTUpsert Prompt
      • GETGet Prompt
      • DELDelete Prompt
      • PATCHMove Prompt
      • POSTPopulate Prompt template
      • GETList Versions of a Prompt
      • DELDelete Prompt Version
      • PATCHUpdate Prompt Version
      • POSTDeploy Prompt
      • DELRemove Deployment
      • GETList a Prompt's Environments
      • POSTUpdate Monitoring
      • GETSerialize
      • POSTDeserialize
LogoLogo
Sign inBook a demo
APIPrompts

List Versions of a Prompt

GET
https://api.humanloop.com/v5/prompts/:id/versions
GET
/v5/prompts/:id/versions
$curl https://api.humanloop.com/v5/prompts/pr_30gco7dx6JDq4200GVOHa/versions \
> -H "X-API-KEY: <apiKey>"
1{
2 "records": [
3 {
4 "path": "Personal Projects/Coding Assistant",
5 "id": "pr_30gco7dx6JDq4200GVOHa",
6 "model": "gpt-4o",
7 "name": "Coding Assistant",
8 "version_id": "prv_7ZlQREDScH0xkhUwtXruN",
9 "created_at": "2024-07-08T22:40:35.656915",
10 "updated_at": "2024-07-08T22:40:35.656915",
11 "last_used_at": "2024-07-08T22:40:35.656915",
12 "version_logs_count": 0,
13 "total_logs_count": 0,
14 "inputs": [
15 {
16 "name": "messages"
17 }
18 ],
19 "endpoint": "chat",
20 "template": [
21 {
22 "content": "You are a helpful coding assistant specialising in {{language}}",
23 "role": "system"
24 }
25 ],
26 "provider": "openai",
27 "max_tokens": -1,
28 "temperature": 0.7,
29 "version_name": "coding-assistant-v1",
30 "version_description": "Initial version",
31 "type": "prompt",
32 "environments": [
33 {
34 "id": "env_ffSVxEBzJcBZ1H5jcNMVj",
35 "created_at": "2023-06-27T23:16:07.992339",
36 "name": "development",
37 "tag": "default"
38 }
39 ],
40 "created_by": {
41 "id": "usr_01RJO1k2spBVqNUt1ASef",
42 "email_address": "raza@humanloop.com",
43 "full_name": "Raza Habib"
44 },
45 "evaluator_aggregates": null
46 }
47 ]
48}
Get a list of all the versions of a Prompt.
Was this page helpful?
Previous

Delete Prompt Version

Next
Built with

Authentication

X-API-KEYstring
API Key authentication via header

Path parameters

idstringRequired
Unique identifier for Prompt.

Query parameters

evaluator_aggregatesbooleanOptional
Whether to include Evaluator aggregate results for the versions in the response

Response

Successful Response
recordslist of objects
The list of Prompts.

Errors

422
List Versions Prompts ID Versions Get Request Unprocessable Entity Error