Typescript (SDK)
import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";
const raijinLabsLucidAi = new RaijinLabsLucidAi();
async function run() {
const result = await raijinLabsLucidAi.match.planRoute({});
console.log(result);
}
run();curl --request POST \
--url http://localhost:3001/v1/route \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"compute_catalog": [
{
"schema_version": "1.0",
"compute_passport_id": "<string>",
"regions": [
"<string>"
],
"hardware": {
"gpu": "<string>",
"vram_gb": 1,
"arch": "<string>",
"gpu_count": 1,
"cpu_cores": 2,
"memory_gb": 2
},
"runtimes": [
{
"version": "<string>",
"image": "<string>"
}
],
"endpoints": {
"inference_url": "<string>",
"quote_url": "<string>",
"jobs_url": "<string>",
"health_url": "<string>",
"metrics_url": "<string>"
},
"operator_pubkey": "<string>",
"residency_supported": false,
"gpu_fingerprint": "<string>",
"runtime_hash": "<string>",
"capabilities": {
"supports_streaming": true,
"supports_attestation": false,
"supports_cc_on": false,
"inference_types": []
},
"network": {
"p95_ms_estimate": 1,
"bandwidth": "<string>"
},
"limits": {
"max_context": 1,
"max_batch": 1,
"max_input_tokens": 2,
"max_output_tokens": 2,
"requests_per_minute": 2
},
"pricing": {
"price_per_1k_tokens_estimate": 1,
"price_per_minute_estimate": 1,
"per_input_token": 1,
"per_output_token": 1
},
"workers": [
{
"worker_id": "<string>",
"last_heartbeat": 123
}
],
"sla": {
"uptime_target": 50
},
"policy_tags": [
"<string>"
],
"metadata": {}
}
],
"request_id": "<string>",
"require_live_healthy": true
}
'import requests
url = "http://localhost:3001/v1/route"
payload = {
"compute_catalog": [
{
"schema_version": "1.0",
"compute_passport_id": "<string>",
"regions": ["<string>"],
"hardware": {
"gpu": "<string>",
"vram_gb": 1,
"arch": "<string>",
"gpu_count": 1,
"cpu_cores": 2,
"memory_gb": 2
},
"runtimes": [
{
"version": "<string>",
"image": "<string>"
}
],
"endpoints": {
"inference_url": "<string>",
"quote_url": "<string>",
"jobs_url": "<string>",
"health_url": "<string>",
"metrics_url": "<string>"
},
"operator_pubkey": "<string>",
"residency_supported": False,
"gpu_fingerprint": "<string>",
"runtime_hash": "<string>",
"capabilities": {
"supports_streaming": True,
"supports_attestation": False,
"supports_cc_on": False,
"inference_types": []
},
"network": {
"p95_ms_estimate": 1,
"bandwidth": "<string>"
},
"limits": {
"max_context": 1,
"max_batch": 1,
"max_input_tokens": 2,
"max_output_tokens": 2,
"requests_per_minute": 2
},
"pricing": {
"price_per_1k_tokens_estimate": 1,
"price_per_minute_estimate": 1,
"per_input_token": 1,
"per_output_token": 1
},
"workers": [
{
"worker_id": "<string>",
"last_heartbeat": 123
}
],
"sla": { "uptime_target": 50 },
"policy_tags": ["<string>"],
"metadata": {}
}
],
"request_id": "<string>",
"require_live_healthy": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
compute_catalog: [
{
schema_version: '1.0',
compute_passport_id: '<string>',
regions: ['<string>'],
hardware: {
gpu: '<string>',
vram_gb: 1,
arch: '<string>',
gpu_count: 1,
cpu_cores: 2,
memory_gb: 2
},
runtimes: [{version: '<string>', image: '<string>'}],
endpoints: {
inference_url: '<string>',
quote_url: '<string>',
jobs_url: '<string>',
health_url: '<string>',
metrics_url: '<string>'
},
operator_pubkey: '<string>',
residency_supported: false,
gpu_fingerprint: '<string>',
runtime_hash: '<string>',
capabilities: {
supports_streaming: true,
supports_attestation: false,
supports_cc_on: false,
inference_types: []
},
network: {p95_ms_estimate: 1, bandwidth: '<string>'},
limits: {
max_context: 1,
max_batch: 1,
max_input_tokens: 2,
max_output_tokens: 2,
requests_per_minute: 2
},
pricing: {
price_per_1k_tokens_estimate: 1,
price_per_minute_estimate: 1,
per_input_token: 1,
per_output_token: 1
},
workers: [{worker_id: '<string>', last_heartbeat: 123}],
sla: {uptime_target: 50},
policy_tags: ['<string>'],
metadata: {}
}
],
request_id: '<string>',
require_live_healthy: true
})
};
fetch('http://localhost:3001/v1/route', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/v1/route",
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([
'compute_catalog' => [
[
'schema_version' => '1.0',
'compute_passport_id' => '<string>',
'regions' => [
'<string>'
],
'hardware' => [
'gpu' => '<string>',
'vram_gb' => 1,
'arch' => '<string>',
'gpu_count' => 1,
'cpu_cores' => 2,
'memory_gb' => 2
],
'runtimes' => [
[
'version' => '<string>',
'image' => '<string>'
]
],
'endpoints' => [
'inference_url' => '<string>',
'quote_url' => '<string>',
'jobs_url' => '<string>',
'health_url' => '<string>',
'metrics_url' => '<string>'
],
'operator_pubkey' => '<string>',
'residency_supported' => false,
'gpu_fingerprint' => '<string>',
'runtime_hash' => '<string>',
'capabilities' => [
'supports_streaming' => true,
'supports_attestation' => false,
'supports_cc_on' => false,
'inference_types' => [
]
],
'network' => [
'p95_ms_estimate' => 1,
'bandwidth' => '<string>'
],
'limits' => [
'max_context' => 1,
'max_batch' => 1,
'max_input_tokens' => 2,
'max_output_tokens' => 2,
'requests_per_minute' => 2
],
'pricing' => [
'price_per_1k_tokens_estimate' => 1,
'price_per_minute_estimate' => 1,
'per_input_token' => 1,
'per_output_token' => 1
],
'workers' => [
[
'worker_id' => '<string>',
'last_heartbeat' => 123
]
],
'sla' => [
'uptime_target' => 50
],
'policy_tags' => [
'<string>'
],
'metadata' => [
]
]
],
'request_id' => '<string>',
'require_live_healthy' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "http://localhost:3001/v1/route"
payload := strings.NewReader("{\n \"compute_catalog\": [\n {\n \"schema_version\": \"1.0\",\n \"compute_passport_id\": \"<string>\",\n \"regions\": [\n \"<string>\"\n ],\n \"hardware\": {\n \"gpu\": \"<string>\",\n \"vram_gb\": 1,\n \"arch\": \"<string>\",\n \"gpu_count\": 1,\n \"cpu_cores\": 2,\n \"memory_gb\": 2\n },\n \"runtimes\": [\n {\n \"version\": \"<string>\",\n \"image\": \"<string>\"\n }\n ],\n \"endpoints\": {\n \"inference_url\": \"<string>\",\n \"quote_url\": \"<string>\",\n \"jobs_url\": \"<string>\",\n \"health_url\": \"<string>\",\n \"metrics_url\": \"<string>\"\n },\n \"operator_pubkey\": \"<string>\",\n \"residency_supported\": false,\n \"gpu_fingerprint\": \"<string>\",\n \"runtime_hash\": \"<string>\",\n \"capabilities\": {\n \"supports_streaming\": true,\n \"supports_attestation\": false,\n \"supports_cc_on\": false,\n \"inference_types\": []\n },\n \"network\": {\n \"p95_ms_estimate\": 1,\n \"bandwidth\": \"<string>\"\n },\n \"limits\": {\n \"max_context\": 1,\n \"max_batch\": 1,\n \"max_input_tokens\": 2,\n \"max_output_tokens\": 2,\n \"requests_per_minute\": 2\n },\n \"pricing\": {\n \"price_per_1k_tokens_estimate\": 1,\n \"price_per_minute_estimate\": 1,\n \"per_input_token\": 1,\n \"per_output_token\": 1\n },\n \"workers\": [\n {\n \"worker_id\": \"<string>\",\n \"last_heartbeat\": 123\n }\n ],\n \"sla\": {\n \"uptime_target\": 50\n },\n \"policy_tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n }\n ],\n \"request_id\": \"<string>\",\n \"require_live_healthy\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("http://localhost:3001/v1/route")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"compute_catalog\": [\n {\n \"schema_version\": \"1.0\",\n \"compute_passport_id\": \"<string>\",\n \"regions\": [\n \"<string>\"\n ],\n \"hardware\": {\n \"gpu\": \"<string>\",\n \"vram_gb\": 1,\n \"arch\": \"<string>\",\n \"gpu_count\": 1,\n \"cpu_cores\": 2,\n \"memory_gb\": 2\n },\n \"runtimes\": [\n {\n \"version\": \"<string>\",\n \"image\": \"<string>\"\n }\n ],\n \"endpoints\": {\n \"inference_url\": \"<string>\",\n \"quote_url\": \"<string>\",\n \"jobs_url\": \"<string>\",\n \"health_url\": \"<string>\",\n \"metrics_url\": \"<string>\"\n },\n \"operator_pubkey\": \"<string>\",\n \"residency_supported\": false,\n \"gpu_fingerprint\": \"<string>\",\n \"runtime_hash\": \"<string>\",\n \"capabilities\": {\n \"supports_streaming\": true,\n \"supports_attestation\": false,\n \"supports_cc_on\": false,\n \"inference_types\": []\n },\n \"network\": {\n \"p95_ms_estimate\": 1,\n \"bandwidth\": \"<string>\"\n },\n \"limits\": {\n \"max_context\": 1,\n \"max_batch\": 1,\n \"max_input_tokens\": 2,\n \"max_output_tokens\": 2,\n \"requests_per_minute\": 2\n },\n \"pricing\": {\n \"price_per_1k_tokens_estimate\": 1,\n \"price_per_minute_estimate\": 1,\n \"per_input_token\": 1,\n \"per_output_token\": 1\n },\n \"workers\": [\n {\n \"worker_id\": \"<string>\",\n \"last_heartbeat\": 123\n }\n ],\n \"sla\": {\n \"uptime_target\": 50\n },\n \"policy_tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n }\n ],\n \"request_id\": \"<string>\",\n \"require_live_healthy\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/v1/route")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"compute_catalog\": [\n {\n \"schema_version\": \"1.0\",\n \"compute_passport_id\": \"<string>\",\n \"regions\": [\n \"<string>\"\n ],\n \"hardware\": {\n \"gpu\": \"<string>\",\n \"vram_gb\": 1,\n \"arch\": \"<string>\",\n \"gpu_count\": 1,\n \"cpu_cores\": 2,\n \"memory_gb\": 2\n },\n \"runtimes\": [\n {\n \"version\": \"<string>\",\n \"image\": \"<string>\"\n }\n ],\n \"endpoints\": {\n \"inference_url\": \"<string>\",\n \"quote_url\": \"<string>\",\n \"jobs_url\": \"<string>\",\n \"health_url\": \"<string>\",\n \"metrics_url\": \"<string>\"\n },\n \"operator_pubkey\": \"<string>\",\n \"residency_supported\": false,\n \"gpu_fingerprint\": \"<string>\",\n \"runtime_hash\": \"<string>\",\n \"capabilities\": {\n \"supports_streaming\": true,\n \"supports_attestation\": false,\n \"supports_cc_on\": false,\n \"inference_types\": []\n },\n \"network\": {\n \"p95_ms_estimate\": 1,\n \"bandwidth\": \"<string>\"\n },\n \"limits\": {\n \"max_context\": 1,\n \"max_batch\": 1,\n \"max_input_tokens\": 2,\n \"max_output_tokens\": 2,\n \"requests_per_minute\": 2\n },\n \"pricing\": {\n \"price_per_1k_tokens_estimate\": 1,\n \"price_per_minute_estimate\": 1,\n \"per_input_token\": 1,\n \"per_output_token\": 1\n },\n \"workers\": [\n {\n \"worker_id\": \"<string>\",\n \"last_heartbeat\": 123\n }\n ],\n \"sla\": {\n \"uptime_target\": 50\n },\n \"policy_tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n }\n ],\n \"request_id\": \"<string>\",\n \"require_live_healthy\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"route": {
"compute_passport_id": "<string>",
"model_passport_id": "<string>",
"endpoint": "<string>",
"runtime": "<string>",
"policy_hash": "<string>",
"fallbacks": [
{}
]
},
"explain": {},
"request_id": "<string>"
}{
"success": true,
"error": "<string>",
"message": "<string>",
"error_code": "<string>",
"details": "<unknown>"
}{
"success": true,
"error": "<string>",
"message": "<string>",
"error_code": "<string>",
"details": "<unknown>"
}Match
Plan a route (match + resolve endpoint)
Perform compute matching and resolve an executable inference endpoint in a single call. Returns the matched compute node, model, endpoint URL, runtime, policy hash, and fallback options.
POST
/
v1
/
route
Typescript (SDK)
import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";
const raijinLabsLucidAi = new RaijinLabsLucidAi();
async function run() {
const result = await raijinLabsLucidAi.match.planRoute({});
console.log(result);
}
run();curl --request POST \
--url http://localhost:3001/v1/route \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"compute_catalog": [
{
"schema_version": "1.0",
"compute_passport_id": "<string>",
"regions": [
"<string>"
],
"hardware": {
"gpu": "<string>",
"vram_gb": 1,
"arch": "<string>",
"gpu_count": 1,
"cpu_cores": 2,
"memory_gb": 2
},
"runtimes": [
{
"version": "<string>",
"image": "<string>"
}
],
"endpoints": {
"inference_url": "<string>",
"quote_url": "<string>",
"jobs_url": "<string>",
"health_url": "<string>",
"metrics_url": "<string>"
},
"operator_pubkey": "<string>",
"residency_supported": false,
"gpu_fingerprint": "<string>",
"runtime_hash": "<string>",
"capabilities": {
"supports_streaming": true,
"supports_attestation": false,
"supports_cc_on": false,
"inference_types": []
},
"network": {
"p95_ms_estimate": 1,
"bandwidth": "<string>"
},
"limits": {
"max_context": 1,
"max_batch": 1,
"max_input_tokens": 2,
"max_output_tokens": 2,
"requests_per_minute": 2
},
"pricing": {
"price_per_1k_tokens_estimate": 1,
"price_per_minute_estimate": 1,
"per_input_token": 1,
"per_output_token": 1
},
"workers": [
{
"worker_id": "<string>",
"last_heartbeat": 123
}
],
"sla": {
"uptime_target": 50
},
"policy_tags": [
"<string>"
],
"metadata": {}
}
],
"request_id": "<string>",
"require_live_healthy": true
}
'import requests
url = "http://localhost:3001/v1/route"
payload = {
"compute_catalog": [
{
"schema_version": "1.0",
"compute_passport_id": "<string>",
"regions": ["<string>"],
"hardware": {
"gpu": "<string>",
"vram_gb": 1,
"arch": "<string>",
"gpu_count": 1,
"cpu_cores": 2,
"memory_gb": 2
},
"runtimes": [
{
"version": "<string>",
"image": "<string>"
}
],
"endpoints": {
"inference_url": "<string>",
"quote_url": "<string>",
"jobs_url": "<string>",
"health_url": "<string>",
"metrics_url": "<string>"
},
"operator_pubkey": "<string>",
"residency_supported": False,
"gpu_fingerprint": "<string>",
"runtime_hash": "<string>",
"capabilities": {
"supports_streaming": True,
"supports_attestation": False,
"supports_cc_on": False,
"inference_types": []
},
"network": {
"p95_ms_estimate": 1,
"bandwidth": "<string>"
},
"limits": {
"max_context": 1,
"max_batch": 1,
"max_input_tokens": 2,
"max_output_tokens": 2,
"requests_per_minute": 2
},
"pricing": {
"price_per_1k_tokens_estimate": 1,
"price_per_minute_estimate": 1,
"per_input_token": 1,
"per_output_token": 1
},
"workers": [
{
"worker_id": "<string>",
"last_heartbeat": 123
}
],
"sla": { "uptime_target": 50 },
"policy_tags": ["<string>"],
"metadata": {}
}
],
"request_id": "<string>",
"require_live_healthy": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
compute_catalog: [
{
schema_version: '1.0',
compute_passport_id: '<string>',
regions: ['<string>'],
hardware: {
gpu: '<string>',
vram_gb: 1,
arch: '<string>',
gpu_count: 1,
cpu_cores: 2,
memory_gb: 2
},
runtimes: [{version: '<string>', image: '<string>'}],
endpoints: {
inference_url: '<string>',
quote_url: '<string>',
jobs_url: '<string>',
health_url: '<string>',
metrics_url: '<string>'
},
operator_pubkey: '<string>',
residency_supported: false,
gpu_fingerprint: '<string>',
runtime_hash: '<string>',
capabilities: {
supports_streaming: true,
supports_attestation: false,
supports_cc_on: false,
inference_types: []
},
network: {p95_ms_estimate: 1, bandwidth: '<string>'},
limits: {
max_context: 1,
max_batch: 1,
max_input_tokens: 2,
max_output_tokens: 2,
requests_per_minute: 2
},
pricing: {
price_per_1k_tokens_estimate: 1,
price_per_minute_estimate: 1,
per_input_token: 1,
per_output_token: 1
},
workers: [{worker_id: '<string>', last_heartbeat: 123}],
sla: {uptime_target: 50},
policy_tags: ['<string>'],
metadata: {}
}
],
request_id: '<string>',
require_live_healthy: true
})
};
fetch('http://localhost:3001/v1/route', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/v1/route",
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([
'compute_catalog' => [
[
'schema_version' => '1.0',
'compute_passport_id' => '<string>',
'regions' => [
'<string>'
],
'hardware' => [
'gpu' => '<string>',
'vram_gb' => 1,
'arch' => '<string>',
'gpu_count' => 1,
'cpu_cores' => 2,
'memory_gb' => 2
],
'runtimes' => [
[
'version' => '<string>',
'image' => '<string>'
]
],
'endpoints' => [
'inference_url' => '<string>',
'quote_url' => '<string>',
'jobs_url' => '<string>',
'health_url' => '<string>',
'metrics_url' => '<string>'
],
'operator_pubkey' => '<string>',
'residency_supported' => false,
'gpu_fingerprint' => '<string>',
'runtime_hash' => '<string>',
'capabilities' => [
'supports_streaming' => true,
'supports_attestation' => false,
'supports_cc_on' => false,
'inference_types' => [
]
],
'network' => [
'p95_ms_estimate' => 1,
'bandwidth' => '<string>'
],
'limits' => [
'max_context' => 1,
'max_batch' => 1,
'max_input_tokens' => 2,
'max_output_tokens' => 2,
'requests_per_minute' => 2
],
'pricing' => [
'price_per_1k_tokens_estimate' => 1,
'price_per_minute_estimate' => 1,
'per_input_token' => 1,
'per_output_token' => 1
],
'workers' => [
[
'worker_id' => '<string>',
'last_heartbeat' => 123
]
],
'sla' => [
'uptime_target' => 50
],
'policy_tags' => [
'<string>'
],
'metadata' => [
]
]
],
'request_id' => '<string>',
'require_live_healthy' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "http://localhost:3001/v1/route"
payload := strings.NewReader("{\n \"compute_catalog\": [\n {\n \"schema_version\": \"1.0\",\n \"compute_passport_id\": \"<string>\",\n \"regions\": [\n \"<string>\"\n ],\n \"hardware\": {\n \"gpu\": \"<string>\",\n \"vram_gb\": 1,\n \"arch\": \"<string>\",\n \"gpu_count\": 1,\n \"cpu_cores\": 2,\n \"memory_gb\": 2\n },\n \"runtimes\": [\n {\n \"version\": \"<string>\",\n \"image\": \"<string>\"\n }\n ],\n \"endpoints\": {\n \"inference_url\": \"<string>\",\n \"quote_url\": \"<string>\",\n \"jobs_url\": \"<string>\",\n \"health_url\": \"<string>\",\n \"metrics_url\": \"<string>\"\n },\n \"operator_pubkey\": \"<string>\",\n \"residency_supported\": false,\n \"gpu_fingerprint\": \"<string>\",\n \"runtime_hash\": \"<string>\",\n \"capabilities\": {\n \"supports_streaming\": true,\n \"supports_attestation\": false,\n \"supports_cc_on\": false,\n \"inference_types\": []\n },\n \"network\": {\n \"p95_ms_estimate\": 1,\n \"bandwidth\": \"<string>\"\n },\n \"limits\": {\n \"max_context\": 1,\n \"max_batch\": 1,\n \"max_input_tokens\": 2,\n \"max_output_tokens\": 2,\n \"requests_per_minute\": 2\n },\n \"pricing\": {\n \"price_per_1k_tokens_estimate\": 1,\n \"price_per_minute_estimate\": 1,\n \"per_input_token\": 1,\n \"per_output_token\": 1\n },\n \"workers\": [\n {\n \"worker_id\": \"<string>\",\n \"last_heartbeat\": 123\n }\n ],\n \"sla\": {\n \"uptime_target\": 50\n },\n \"policy_tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n }\n ],\n \"request_id\": \"<string>\",\n \"require_live_healthy\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("http://localhost:3001/v1/route")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"compute_catalog\": [\n {\n \"schema_version\": \"1.0\",\n \"compute_passport_id\": \"<string>\",\n \"regions\": [\n \"<string>\"\n ],\n \"hardware\": {\n \"gpu\": \"<string>\",\n \"vram_gb\": 1,\n \"arch\": \"<string>\",\n \"gpu_count\": 1,\n \"cpu_cores\": 2,\n \"memory_gb\": 2\n },\n \"runtimes\": [\n {\n \"version\": \"<string>\",\n \"image\": \"<string>\"\n }\n ],\n \"endpoints\": {\n \"inference_url\": \"<string>\",\n \"quote_url\": \"<string>\",\n \"jobs_url\": \"<string>\",\n \"health_url\": \"<string>\",\n \"metrics_url\": \"<string>\"\n },\n \"operator_pubkey\": \"<string>\",\n \"residency_supported\": false,\n \"gpu_fingerprint\": \"<string>\",\n \"runtime_hash\": \"<string>\",\n \"capabilities\": {\n \"supports_streaming\": true,\n \"supports_attestation\": false,\n \"supports_cc_on\": false,\n \"inference_types\": []\n },\n \"network\": {\n \"p95_ms_estimate\": 1,\n \"bandwidth\": \"<string>\"\n },\n \"limits\": {\n \"max_context\": 1,\n \"max_batch\": 1,\n \"max_input_tokens\": 2,\n \"max_output_tokens\": 2,\n \"requests_per_minute\": 2\n },\n \"pricing\": {\n \"price_per_1k_tokens_estimate\": 1,\n \"price_per_minute_estimate\": 1,\n \"per_input_token\": 1,\n \"per_output_token\": 1\n },\n \"workers\": [\n {\n \"worker_id\": \"<string>\",\n \"last_heartbeat\": 123\n }\n ],\n \"sla\": {\n \"uptime_target\": 50\n },\n \"policy_tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n }\n ],\n \"request_id\": \"<string>\",\n \"require_live_healthy\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/v1/route")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"compute_catalog\": [\n {\n \"schema_version\": \"1.0\",\n \"compute_passport_id\": \"<string>\",\n \"regions\": [\n \"<string>\"\n ],\n \"hardware\": {\n \"gpu\": \"<string>\",\n \"vram_gb\": 1,\n \"arch\": \"<string>\",\n \"gpu_count\": 1,\n \"cpu_cores\": 2,\n \"memory_gb\": 2\n },\n \"runtimes\": [\n {\n \"version\": \"<string>\",\n \"image\": \"<string>\"\n }\n ],\n \"endpoints\": {\n \"inference_url\": \"<string>\",\n \"quote_url\": \"<string>\",\n \"jobs_url\": \"<string>\",\n \"health_url\": \"<string>\",\n \"metrics_url\": \"<string>\"\n },\n \"operator_pubkey\": \"<string>\",\n \"residency_supported\": false,\n \"gpu_fingerprint\": \"<string>\",\n \"runtime_hash\": \"<string>\",\n \"capabilities\": {\n \"supports_streaming\": true,\n \"supports_attestation\": false,\n \"supports_cc_on\": false,\n \"inference_types\": []\n },\n \"network\": {\n \"p95_ms_estimate\": 1,\n \"bandwidth\": \"<string>\"\n },\n \"limits\": {\n \"max_context\": 1,\n \"max_batch\": 1,\n \"max_input_tokens\": 2,\n \"max_output_tokens\": 2,\n \"requests_per_minute\": 2\n },\n \"pricing\": {\n \"price_per_1k_tokens_estimate\": 1,\n \"price_per_minute_estimate\": 1,\n \"per_input_token\": 1,\n \"per_output_token\": 1\n },\n \"workers\": [\n {\n \"worker_id\": \"<string>\",\n \"last_heartbeat\": 123\n }\n ],\n \"sla\": {\n \"uptime_target\": 50\n },\n \"policy_tags\": [\n \"<string>\"\n ],\n \"metadata\": {}\n }\n ],\n \"request_id\": \"<string>\",\n \"require_live_healthy\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"route": {
"compute_passport_id": "<string>",
"model_passport_id": "<string>",
"endpoint": "<string>",
"runtime": "<string>",
"policy_hash": "<string>",
"fallbacks": [
{}
]
},
"explain": {},
"request_id": "<string>"
}{
"success": true,
"error": "<string>",
"message": "<string>",
"error_code": "<string>",
"details": "<unknown>"
}{
"success": true,
"error": "<string>",
"message": "<string>",
"error_code": "<string>",
"details": "<unknown>"
}Authorizations
Lucid API key (lk_live_... or lk_test_...)
Body
application/json
⌘I
.png?fit=max&auto=format&n=VsjUqn6fLqEhBiuI&q=85&s=8b4c7e6431e9a6af1ef23b77bb4ff5fd)
.png?fit=max&auto=format&n=VsjUqn6fLqEhBiuI&q=85&s=d5651a45e4bfbabc33f74e146af3f94a)