Skip to main content
GET
/
ai
/
qakb
/
algorithms
/
{algorithm_key}
/
recipe
Get Haiqu Algorithm Recipe
curl --request GET \
  --url 'https://api.example.com/ai/qakb/algorithms/{algorithm_key}/recipe?HAIQU_API_KEY='
import requests

url = "https://api.example.com/ai/qakb/algorithms/{algorithm_key}/recipe?HAIQU_API_KEY="

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.example.com/ai/qakb/algorithms/{algorithm_key}/recipe?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/qakb/algorithms/{algorithm_key}/recipe?HAIQU_API_KEY=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$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.example.com/ai/qakb/algorithms/{algorithm_key}/recipe?HAIQU_API_KEY="

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

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.example.com/ai/qakb/algorithms/{algorithm_key}/recipe?HAIQU_API_KEY=")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/ai/qakb/algorithms/{algorithm_key}/recipe?HAIQU_API_KEY=")

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

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "algorithm": "<string>",
  "code": "<string>",
  "note": "<string>",
  "language": "python",
  "steps": [
    {
      "id": "<string>",
      "title": "<string>",
      "intent": "<string>",
      "render_before": [
        "<string>"
      ],
      "render_after": [
        "<string>"
      ]
    }
  ]
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

HAIQU_API_KEY
string
query
required

Path Parameters

algorithm_key
string
required

Response

Successful Response

A self-contained, runnable Python script for one algorithm, plus a per-algorithm demo orchestration plan.

algorithm
string
required

Algorithm key the recipe is for.

code
string
required

Complete, copy-pasteable Python script. Runs locally and on Haiqu.

note
string
required

How to run it + which variants need a Haiqu API key.

language
string
default:python

Source language of the recipe.

steps
RecipeStep · object[]

Ordered demo plan. The orchestrating LLM should walk these in order, rendering the indicated artifacts inline. The plan is algorithm-agnostic in shape; algorithm-specific render content comes from sandbox-side hooks the recipe defines (compute_results, format_headline).