cURL
curl --request GET \
--url https://my.orq.ai/v2/deployments/{keyOrID}/versions \
--header 'Authorization: Bearer <token>'import { Orq } from '@orq-ai/node';
const orq = new Orq({ apiKey: process.env.ORQ_API_KEY ?? '' });
const versions = await orq.deployments.listVersions({
keyOrID: 'customer-support',
limit: 10,
});import requests
url = "https://my.orq.ai/v2/deployments/{keyOrID}/versions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"object": "list",
"data": [
{
"_id": "<string>",
"deployment_id": "<string>",
"variant_id": "<string>",
"prompt_config": {
"model": "<string>",
"model_db_id": "<string>",
"model_type": "chat",
"model_parameters": {
"temperature": 123,
"maxTokens": 123,
"topK": 123,
"topP": 123,
"frequencyPenalty": 123,
"presencePenalty": 123,
"numImages": 123,
"seed": 123,
"format": "url",
"dimensions": "<string>",
"quality": "<string>",
"style": "<string>",
"responseFormat": {
"type": "json_schema",
"json_schema": {
"name": "<string>",
"schema": {},
"description": "<string>",
"strict": true
},
"display_name": "<string>"
},
"cacheControl": {
"type": "ephemeral",
"ttl": "5m"
},
"photoRealVersion": "v1",
"encoding_format": "float",
"reasoningEffort": "none",
"budgetTokens": 123,
"verbosity": "low",
"thinkingLevel": "minimal"
},
"provider": "openai",
"messages": [
{
"role": "system",
"content": "<string>",
"tool_calls": [
{
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
},
"id": "<string>",
"index": 123
}
],
"tool_call_id": "<string>",
"id": "<string>"
}
],
"integration_id": "<string>",
"version": "<string>"
},
"fallbacks": [
{
"model": "<string>",
"model_db_id": "<string>",
"model_type": "chat",
"model_parameters": {
"temperature": 123,
"maxTokens": 123,
"topK": 123,
"topP": 123,
"frequencyPenalty": 123,
"presencePenalty": 123,
"numImages": 123,
"seed": 123,
"format": "url",
"dimensions": "<string>",
"quality": "<string>",
"style": "<string>",
"responseFormat": {
"type": "json_schema",
"json_schema": {
"name": "<string>",
"schema": {},
"description": "<string>",
"strict": true
},
"display_name": "<string>"
},
"cacheControl": {
"type": "ephemeral",
"ttl": "5m"
},
"photoRealVersion": "v1",
"encoding_format": "float",
"reasoningEffort": "none",
"budgetTokens": 123,
"verbosity": "low",
"thinkingLevel": "minimal"
},
"provider": "openai",
"integration_id": "<string>",
"version": "<string>"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"parameters": {
"type": "object",
"properties": {},
"required": [
"<string>"
],
"additionalProperties": false
},
"description": "<string>",
"strict": true
},
"display_name": "<string>",
"id": 123
}
],
"variables": [
{
"key": "<string>",
"value": "<unknown>",
"is_pii": false,
"description": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>",
"description": "<string>",
"status": "live",
"user_id": "<string>",
"notes": "<string>",
"retry_count": 123,
"knowledge_bases": [],
"settings": {
"guardrails": [
{
"id": "<string>",
"execute_on": "input",
"sample_rate": 50
}
],
"evaluators": [
{
"id": "<string>",
"execute_on": "input",
"sample_rate": 50
}
],
"cache": {
"enabled": false
},
"guardrailBehaviour": "none",
"engine": "text",
"input_masking": false,
"system_masking": false,
"output_masking": false
}
}
],
"has_more": true
}Deployments
List deployment versions
List saved versions across deployment variants, including drafts, newest first. Resolve the deployment by key or ID. Optionally filter by variant_id. Use the version _id with starting_after or ending_before to paginate.
GET
/
v2
/
deployments
/
{keyOrID}
/
versions
cURL
curl --request GET \
--url https://my.orq.ai/v2/deployments/{keyOrID}/versions \
--header 'Authorization: Bearer <token>'import { Orq } from '@orq-ai/node';
const orq = new Orq({ apiKey: process.env.ORQ_API_KEY ?? '' });
const versions = await orq.deployments.listVersions({
keyOrID: 'customer-support',
limit: 10,
});import requests
url = "https://my.orq.ai/v2/deployments/{keyOrID}/versions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"object": "list",
"data": [
{
"_id": "<string>",
"deployment_id": "<string>",
"variant_id": "<string>",
"prompt_config": {
"model": "<string>",
"model_db_id": "<string>",
"model_type": "chat",
"model_parameters": {
"temperature": 123,
"maxTokens": 123,
"topK": 123,
"topP": 123,
"frequencyPenalty": 123,
"presencePenalty": 123,
"numImages": 123,
"seed": 123,
"format": "url",
"dimensions": "<string>",
"quality": "<string>",
"style": "<string>",
"responseFormat": {
"type": "json_schema",
"json_schema": {
"name": "<string>",
"schema": {},
"description": "<string>",
"strict": true
},
"display_name": "<string>"
},
"cacheControl": {
"type": "ephemeral",
"ttl": "5m"
},
"photoRealVersion": "v1",
"encoding_format": "float",
"reasoningEffort": "none",
"budgetTokens": 123,
"verbosity": "low",
"thinkingLevel": "minimal"
},
"provider": "openai",
"messages": [
{
"role": "system",
"content": "<string>",
"tool_calls": [
{
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
},
"id": "<string>",
"index": 123
}
],
"tool_call_id": "<string>",
"id": "<string>"
}
],
"integration_id": "<string>",
"version": "<string>"
},
"fallbacks": [
{
"model": "<string>",
"model_db_id": "<string>",
"model_type": "chat",
"model_parameters": {
"temperature": 123,
"maxTokens": 123,
"topK": 123,
"topP": 123,
"frequencyPenalty": 123,
"presencePenalty": 123,
"numImages": 123,
"seed": 123,
"format": "url",
"dimensions": "<string>",
"quality": "<string>",
"style": "<string>",
"responseFormat": {
"type": "json_schema",
"json_schema": {
"name": "<string>",
"schema": {},
"description": "<string>",
"strict": true
},
"display_name": "<string>"
},
"cacheControl": {
"type": "ephemeral",
"ttl": "5m"
},
"photoRealVersion": "v1",
"encoding_format": "float",
"reasoningEffort": "none",
"budgetTokens": 123,
"verbosity": "low",
"thinkingLevel": "minimal"
},
"provider": "openai",
"integration_id": "<string>",
"version": "<string>"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"parameters": {
"type": "object",
"properties": {},
"required": [
"<string>"
],
"additionalProperties": false
},
"description": "<string>",
"strict": true
},
"display_name": "<string>",
"id": 123
}
],
"variables": [
{
"key": "<string>",
"value": "<unknown>",
"is_pii": false,
"description": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"version": "<string>",
"description": "<string>",
"status": "live",
"user_id": "<string>",
"notes": "<string>",
"retry_count": 123,
"knowledge_bases": [],
"settings": {
"guardrails": [
{
"id": "<string>",
"execute_on": "input",
"sample_rate": 50
}
],
"evaluators": [
{
"id": "<string>",
"execute_on": "input",
"sample_rate": 50
}
],
"cache": {
"enabled": false
},
"guardrailBehaviour": "none",
"engine": "text",
"input_masking": false,
"system_masking": false,
"output_masking": false
}
}
],
"has_more": true
}List saved versions by Deployment key or ID. Each version includes its variant ID and saved configuration. Results include drafts and are ordered newest first.
Filter with
variant_id to retrieve one variant’s history. Pass a returned version’s _id as starting_after for the next page or ending_before for the previous page.
See Deployment versioning for saving and restoring versions in the UI.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Deployment key or ID.
Minimum string length:
1Query Parameters
A limit on the number of objects to be returned. Limit can range between 1 and 50, and the default is 10
Required range:
1 <= x <= 50Version _id after which to fetch the next page.
Pattern:
^[0-9A-HJKMNP-TV-Z]{26}$Version _id before which to fetch the previous page.
Pattern:
^[0-9A-HJKMNP-TV-Z]{26}$Return versions of this variant only.
Was this page helpful?