curl --request POST \
--url 'https://api.example.com/ai/create_new_experiment?HAIQU_API_KEY=' \
--header 'Content-Type: application/json' \
--data '
{
"context": "Create an experiment bucket for Bell-state runs and follow-up artifacts.",
"description": "<p>Baseline benchmark for simulator and QPU runs.</p>",
"name": "Bell-state benchmark"
}
'import requests
url = "https://api.example.com/ai/create_new_experiment?HAIQU_API_KEY="
payload = {
"context": "Create an experiment bucket for Bell-state runs and follow-up artifacts.",
"description": "<p>Baseline benchmark for simulator and QPU runs.</p>",
"name": "Bell-state benchmark"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
context: 'Create an experiment bucket for Bell-state runs and follow-up artifacts.',
description: '<p>Baseline benchmark for simulator and QPU runs.</p>',
name: 'Bell-state benchmark'
})
};
fetch('https://api.example.com/ai/create_new_experiment?HAIQU_API_KEY=', 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.example.com/ai/create_new_experiment?HAIQU_API_KEY=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'context' => 'Create an experiment bucket for Bell-state runs and follow-up artifacts.',
'description' => '<p>Baseline benchmark for simulator and QPU runs.</p>',
'name' => 'Bell-state benchmark'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/ai/create_new_experiment?HAIQU_API_KEY="
payload := strings.NewReader("{\n \"context\": \"Create an experiment bucket for Bell-state runs and follow-up artifacts.\",\n \"description\": \"<p>Baseline benchmark for simulator and QPU runs.</p>\",\n \"name\": \"Bell-state benchmark\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/ai/create_new_experiment?HAIQU_API_KEY=")
.header("Content-Type", "application/json")
.body("{\n \"context\": \"Create an experiment bucket for Bell-state runs and follow-up artifacts.\",\n \"description\": \"<p>Baseline benchmark for simulator and QPU runs.</p>\",\n \"name\": \"Bell-state benchmark\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/ai/create_new_experiment?HAIQU_API_KEY=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"context\": \"Create an experiment bucket for Bell-state runs and follow-up artifacts.\",\n \"description\": \"<p>Baseline benchmark for simulator and QPU runs.</p>\",\n \"name\": \"Bell-state benchmark\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"context": "<string>",
"description": "",
"creation_date": "2023-11-07T05:31:56Z",
"tags": "",
"circuits_count": 0,
"jobs_count": 0,
"last_action_date": "2023-11-07T05:31:56Z",
"url": ""
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Create New Experiment
Create an experiment or return the existing experiment with the same name.
Use this tool when starting a new MCP workflow namespace and you need an
experiment_id for later circuit, job, or artifact calls. Name matching
is exact within the authenticated user scope, so the endpoint may return an
existing experiment instead of inserting a new one.
When to Use:
- Call this at the start of a new workflow when later tool calls need
a stable
experiment_id. - Call this when the user has a preferred experiment name and wants to reuse the existing experiment if it already exists.
Constraints:
- Name matching is exact and scoped to the authenticated user.
- The route may return an existing experiment instead of inserting a new one.
Notes:
- The response is the full
ContextExperimentModelobject, not a lightweight acknowledgment wrapper. - For agent-facing output, surface
idandnamefirst, then summarize the context or description in one short line.
Args: user: Authenticated user resolved from the API key. data: Experiment payload containing the requested name plus optional description and MCP context. db: Active database session.
Returns: The created or reused experiment object for the caller scope.
curl --request POST \
--url 'https://api.example.com/ai/create_new_experiment?HAIQU_API_KEY=' \
--header 'Content-Type: application/json' \
--data '
{
"context": "Create an experiment bucket for Bell-state runs and follow-up artifacts.",
"description": "<p>Baseline benchmark for simulator and QPU runs.</p>",
"name": "Bell-state benchmark"
}
'import requests
url = "https://api.example.com/ai/create_new_experiment?HAIQU_API_KEY="
payload = {
"context": "Create an experiment bucket for Bell-state runs and follow-up artifacts.",
"description": "<p>Baseline benchmark for simulator and QPU runs.</p>",
"name": "Bell-state benchmark"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
context: 'Create an experiment bucket for Bell-state runs and follow-up artifacts.',
description: '<p>Baseline benchmark for simulator and QPU runs.</p>',
name: 'Bell-state benchmark'
})
};
fetch('https://api.example.com/ai/create_new_experiment?HAIQU_API_KEY=', 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.example.com/ai/create_new_experiment?HAIQU_API_KEY=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'context' => 'Create an experiment bucket for Bell-state runs and follow-up artifacts.',
'description' => '<p>Baseline benchmark for simulator and QPU runs.</p>',
'name' => 'Bell-state benchmark'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/ai/create_new_experiment?HAIQU_API_KEY="
payload := strings.NewReader("{\n \"context\": \"Create an experiment bucket for Bell-state runs and follow-up artifacts.\",\n \"description\": \"<p>Baseline benchmark for simulator and QPU runs.</p>\",\n \"name\": \"Bell-state benchmark\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/ai/create_new_experiment?HAIQU_API_KEY=")
.header("Content-Type", "application/json")
.body("{\n \"context\": \"Create an experiment bucket for Bell-state runs and follow-up artifacts.\",\n \"description\": \"<p>Baseline benchmark for simulator and QPU runs.</p>\",\n \"name\": \"Bell-state benchmark\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/ai/create_new_experiment?HAIQU_API_KEY=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"context\": \"Create an experiment bucket for Bell-state runs and follow-up artifacts.\",\n \"description\": \"<p>Baseline benchmark for simulator and QPU runs.</p>\",\n \"name\": \"Bell-state benchmark\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"context": "<string>",
"description": "",
"creation_date": "2023-11-07T05:31:56Z",
"tags": "",
"circuits_count": 0,
"jobs_count": 0,
"last_action_date": "2023-11-07T05:31:56Z",
"url": ""
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
Define payload for MCP experiment creation requests.
Attributes: name: Experiment name unique within the caller scope. description: Optional HTML-formatted description persisted by the API. context: ai rationale for creating this experiment.
Response
Successful Response
Represent an experiment with MCP-specific context metadata.
description and creation_date remain optional for compatibility
with legacy database rows.
Attributes:
description: Plain-text experiment description. Optional for legacy
rows that still store NULL.
creation_date: Experiment creation timestamp. Optional for legacy rows
that still store NULL.
context: Additional plain-text guidance for AI agents consuming the
experiment.
url: Dashboard URL for the experiment when available.