Get Experiment
curl --request GET \
--url https://api.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id} \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}', 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.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}",
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: <authorization>"
],
]);
$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.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
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.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": {
"experiment": {
"id": "49ed2bc3-e876-4ac2-8893-fa56eeed1982",
"agent_id": "abb3f6e7-663d-4afd-8006-2e46480af324",
"status": "active",
"completed_reason": null,
"baseline_env": "production",
"baseline_current_version_id": "99ab6abb-fbf4-4cf8-b837-23534442ae13",
"variant_version_id": "5dcfc5e9-f339-437f-b7d5-7316c27fa223",
"traffic_percentage": 30,
"run_hours": {
"timezone": "Europe/London",
"days": {
"mon": { "start": "08:30", "end": "18:00" },
"tue": { "start": "08:30", "end": "18:00" },
"wed": { "start": "08:30", "end": "18:00" },
"thu": { "start": "08:30", "end": "18:00" },
"fri": { "start": "08:30", "end": "18:00" }
}
},
"starts_at": "2026-09-07T07:30:00.000Z",
"ends_at": "2026-09-30T17:00:00.000Z",
"variant_call_quota": 750,
"variant_calls_routed": 262,
"created_by": "9acd611b-dd69-4675-864d-a26e19e7e468",
"created_at": "2026-09-05T16:11:27.043Z",
"completed_at": null
}
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Experiment not found"
}
]
}
Experiments
Get Experiment
Retrieve one experiment and its live progress.
GET
/
v2
/
agents
/
{agent_id}
/
experiments
/
{experiment_id}
Get Experiment
curl --request GET \
--url https://api.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id} \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}', 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.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}",
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: <authorization>"
],
]);
$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.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
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.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": {
"experiment": {
"id": "49ed2bc3-e876-4ac2-8893-fa56eeed1982",
"agent_id": "abb3f6e7-663d-4afd-8006-2e46480af324",
"status": "active",
"completed_reason": null,
"baseline_env": "production",
"baseline_current_version_id": "99ab6abb-fbf4-4cf8-b837-23534442ae13",
"variant_version_id": "5dcfc5e9-f339-437f-b7d5-7316c27fa223",
"traffic_percentage": 30,
"run_hours": {
"timezone": "Europe/London",
"days": {
"mon": { "start": "08:30", "end": "18:00" },
"tue": { "start": "08:30", "end": "18:00" },
"wed": { "start": "08:30", "end": "18:00" },
"thu": { "start": "08:30", "end": "18:00" },
"fri": { "start": "08:30", "end": "18:00" }
}
},
"starts_at": "2026-09-07T07:30:00.000Z",
"ends_at": "2026-09-30T17:00:00.000Z",
"variant_call_quota": 750,
"variant_calls_routed": 262,
"created_by": "9acd611b-dd69-4675-864d-a26e19e7e468",
"created_at": "2026-09-05T16:11:27.043Z",
"completed_at": null
}
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Experiment not found"
}
]
}
Overview
Returns one experiment. For an active experiment,variant_calls_routed is the live count of connected variant calls, so poll this endpoint to track progress toward variant_call_quota. An active experiment whose ends_at has passed is completed with date_ended before it is returned. Use List Experiments to find experiment IDs.
Headers
string
required
Your API key for authentication.
Path Parameters
string
required
The agent’s unique identifier.
string
required
The experiment’s unique identifier. Must be a valid UUID; returns
400 BAD_REQUEST otherwise.Response
object
The experiment.
Show experiment object
Show experiment object
string
Unique identifier for the experiment.
string
The agent the experiment belongs to.
string
active or completed. Completion is terminal.string | null
null while active. On completion, one of manual (stopped through the API), date_ended, quota_reached, or baseline_changed (the baseline environment was repointed).string
The control environment:
production or staging.string | null
The version currently pinned to
baseline_env, read at request time. While the experiment is active this is the control arm; for a completed experiment it may no longer be the version it ran against.string
The version under test.
integer
Share of eligible calls routed to the variant,
1 to 100.object | null
Weekly schedule during which the variant receives traffic, or
null when always eligible. timezone is an IANA name; days maps mon through sun to { "start": "HH:mm", "end": "HH:mm" } windows in that timezone. A window whose end is earlier than its start wraps past midnight.string | null
When variant traffic begins, or
null for immediately.string | null
When the experiment completes on its own, or
null for no end date.integer | null
Maximum connected variant calls, or
null for no cap.integer
Connected calls routed to the variant. Live while active, frozen at completion.
string | null
ID of the user who created the experiment, or
null when created with an org-level key.string
ISO 8601 timestamp of creation.
string | null
ISO 8601 timestamp of completion, or
null while active.null | array
null on success, or a list of error objects if the request failed.{
"data": {
"experiment": {
"id": "49ed2bc3-e876-4ac2-8893-fa56eeed1982",
"agent_id": "abb3f6e7-663d-4afd-8006-2e46480af324",
"status": "active",
"completed_reason": null,
"baseline_env": "production",
"baseline_current_version_id": "99ab6abb-fbf4-4cf8-b837-23534442ae13",
"variant_version_id": "5dcfc5e9-f339-437f-b7d5-7316c27fa223",
"traffic_percentage": 30,
"run_hours": {
"timezone": "Europe/London",
"days": {
"mon": { "start": "08:30", "end": "18:00" },
"tue": { "start": "08:30", "end": "18:00" },
"wed": { "start": "08:30", "end": "18:00" },
"thu": { "start": "08:30", "end": "18:00" },
"fri": { "start": "08:30", "end": "18:00" }
}
},
"starts_at": "2026-09-07T07:30:00.000Z",
"ends_at": "2026-09-30T17:00:00.000Z",
"variant_call_quota": 750,
"variant_calls_routed": 262,
"created_by": "9acd611b-dd69-4675-864d-a26e19e7e468",
"created_at": "2026-09-05T16:11:27.043Z",
"completed_at": null
}
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Experiment not found"
}
]
}
Docs for agents: llms.txt
Was this page helpful?