Skip to main content
GET
/
versions
Get versions
curl --request GET \
  --url https://api.galtea.ai/versions \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.galtea.ai/versions"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.galtea.ai/versions', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.galtea.ai/versions",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.galtea.ai/versions"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.galtea.ai/versions")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.galtea.ai/versions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
[
  {
    "id": "ver_123",
    "productId": "prod_123",
    "userId": "user_123",
    "name": "1.0.0",
    "description": "Version description",
    "modelId": "model_123",
    "systemPrompt": "You are a helpful assistant",
    "datasetUri": "https://example.com/dataset.csv",
    "datasetDescription": "Training dataset",
    "guardrails": "Safety guidelines",
    "initializationEndpointConnectionId": "ec_123",
    "conversationEndpointConnectionId": "ec_123",
    "finalizationEndpointConnectionId": "ec_123",
    "phoneConnectionId": "phoneConnection_123",
    "webRtcConnectionId": "webRtcConnection_123",
    "parentVersionId": "ver_122",
    "createdAt": "2023-11-07T05:31:56Z",
    "deletedAt": "2023-11-07T05:31:56Z"
  }
]
{
  "error": "Error type",
  "message": "Error message description"
}

Authorizations

Authorization
string
header
required

API key authorization. Pass your API key in the Authorization header as a Bearer token. Both new (gsk_*) and legacy (gsk-) API keys are accepted, e.g. Authorization: Bearer gsk_... or Authorization: Bearer gsk-....

Query Parameters

ids
string[]

Filter by version IDs

productIds
string[]

Filter by product IDs

modelIds
string[]

Filter by model IDs (the model assigned to the version)

parentVersionIds
string[]

Filter by parent version IDs. Returns the revisions whose parent is one of these versions (the versions revised from them).

conversationEndpointConnectionIds
string[]

Filter by conversation endpoint connection IDs (include only). Use an empty string ("") to select versions without a conversation endpoint connection

excludeConversationEndpointConnectionIds
string[]

Omit versions with the specified conversation endpoint connection IDs. Use an empty string ("") to omit versions without a conversation endpoint connection

phoneConnectionIds
string[]

Filter by phone connection IDs (include only). Use an empty string ("") to select versions without a phone connection

excludePhoneConnectionIds
string[]

Omit versions with the specified phone connection IDs. Use an empty string ("") to omit versions without a phone connection

webRtcConnectionIds
string[]

Filter by WebRTC connection IDs (include only). Use an empty string ("") to select versions without a WebRTC connection

excludeWebRtcConnectionIds
string[]

Omit versions with the specified WebRTC connection IDs. Use an empty string ("") to omit versions without a WebRTC connection

names
string[]

Filter by version names (exact match, multiple)

name
string

Filter by version name (partial match)

existentInEvaluations
boolean

Filter versions that have evaluations

hasInferenceResults
boolean

Filter versions that have inference results

sort
string[]

Sort instructions (field and direction pairs)

limit
integer

Maximum number of results

offset
integer

Number of results to skip

fromCreatedAt
string<date-time>

Filter versions created at or after this timestamp (ISO 8601 format)

toCreatedAt
string<date-time>

Filter versions created at or before this timestamp (ISO 8601 format)

Response

Versions retrieved successfully

id
string
Example:

"ver_123"

productId
string
Example:

"prod_123"

userId
string | null
Example:

"user_123"

name
string
Example:

"1.0.0"

description
string | null
Example:

"Version description"

modelId
string | null
Example:

"model_123"

systemPrompt
string | null
Example:

"You are a helpful assistant"

datasetUri
string | null
Example:

"https://example.com/dataset.csv"

datasetDescription
string | null
Example:

"Training dataset"

guardrails
string | null
Example:

"Safety guidelines"

initializationEndpointConnectionId
string | null
Example:

"ec_123"

conversationEndpointConnectionId
string | null
Example:

"ec_123"

finalizationEndpointConnectionId
string | null
Example:

"ec_123"

phoneConnectionId
string | null

The version's phone connection (telephony conversation target). At most one conversation target may be set across conversationEndpointConnectionId, phoneConnectionId, and webRtcConnectionId.

Example:

"phoneConnection_123"

webRtcConnectionId
string | null

The version's WebRTC connection (live two-way audio conversation target). At most one conversation target may be set across conversationEndpointConnectionId, phoneConnectionId, and webRtcConnectionId.

Example:

"webRtcConnection_123"

parentVersionId
string | null

Id of the version this one was revised from (its direct parent in the revision lineage). On create, providing this value records the parent edge; the parent must belong to the same product. Omit or null to create a root version with no parent. On responses, this is the recorded parent edge (null for roots).

Example:

"ver_122"

createdAt
string<date-time>
deletedAt
string<date-time> | null