POST /v1/jobsany HTTP client — no SDK required
arclode-sdkcargo add arclode-sdk
arclode_sdk_ffi-c · C / C++ / Unity / Unrealcargo build -p arclode_sdk_ffi-c · #include "arclode_sdk_ffi.h"
ArclodeSDK · SwiftPMimport ArclodeSDK
com.blackleafdigital.arclode · Mavenimplementation("com.blackleafdigital.arclode:sdk")
@arclode/sdk · npmnpm i @arclode/sdk
arclode-sdk · PyPIpip install arclode-sdk
Authorization: Bearer, or the equivalent X-Arclode-Key header), submit an image-generation job, and poll it to a finished result. The same handful of calls in every SDK we ship — pick your language.Swift Content
This is the default content for Swift. Use slot="tab-swift" to provide custom content.
Kotlin Content
This is the default content for Kotlin. Use slot="tab-kotlin" to provide custom content.
TypeScript Content
This is the default content for TypeScript. Use slot="tab-typescript" to provide custom content.
Python Content
This is the default content for Python. Use slot="tab-python" to provide custom content.
Rust Content
This is the default content for Rust. Use slot="tab-rust" to provide custom content.
C Content
This is the default content for C. Use slot="tab-c" to provide custom content.
curl Content
This is the default content for curl. Use slot="tab-curl" to provide custom content.
Swift Package Manager · import ArclodeSDKQuickstart.swift
swift
import ArclodeSDK // One pooled client — build it once, reuse it for every call.let client = try ArclodeClient( baseUrl: "https://api.arclode.com", credential: .bearer(secret: ProcessInfo.processInfo.environment["ARCLODE_API_KEY"]!), timeoutSecs: nil) // Submit an inference job. inputJson is forwarded verbatim to the worker.let submitted = try await client.submitJob( kind: "inference:image:generate", inputJson: #"{ "prompt": "a red fox on a basalt cliff", "model": "fal-ai/flux-2-pro" }"#) // Poll until the run reaches a terminal state.var status = try await client.jobStatus(runId: submitted.runId)while !status.terminal { try await Task.sleep(for: .seconds(1)) status = try await client.jobStatus(runId: submitted.runId)}print(status.rawJson) // the finished job carries output.urlsMaven · com.blackleafdigital.arclode:sdkQuickstart.kt
kotlin
import com.blackleafdigital.arclode.*import kotlinx.coroutines.delay // Every network call is a suspend fn — run it inside a coroutine.val client = ArclodeClient( baseUrl = "https://api.arclode.com", credential = Credential.Bearer(System.getenv("ARCLODE_API_KEY")), timeoutSecs = null,) // Submit an inference job. inputJson is forwarded verbatim to the worker.val submitted = client.submitJob( kind = "inference:image:generate", inputJson = """{ "prompt": "a red fox on a basalt cliff", "model": "fal-ai/flux-2-pro" }""",) // Poll until the run reaches a terminal state.var status = client.jobStatus(runId = submitted.runId)while (!status.terminal) { delay(1000) status = client.jobStatus(runId = submitted.runId)}println(status.rawJson) // the finished job carries output.urlsnpm i @arclode/sdkquickstart.ts
typescript
import { ArclodeClient, Credential } from '@arclode/sdk'; // One pooled client — construct it once, reuse it.const client = new ArclodeClient( 'https://api.arclode.com', Credential.bearer(process.env.ARCLODE_API_KEY!),); // Submit an inference job — the input crosses the addon as a JSON string.const submitted = await client.submitJob( 'inference:image:generate', JSON.stringify({ prompt: 'a red fox on a basalt cliff', model: 'fal-ai/flux-2-pro' }),); // Poll until the run reaches a terminal state.let status = await client.jobStatus(submitted.runId);while (!status.terminal) { await new Promise((r) => setTimeout(r, 1000)); status = await client.jobStatus(submitted.runId);}console.log(status.rawJson); // the finished job carries output.urlspip install arclode-sdkquickstart.py
python
import asyncioimport jsonimport os import arclode_sdk async def main(): # One pooled client — construct it once, reuse it. client = arclode_sdk.ArclodeClient( "https://api.arclode.com", arclode_sdk.Credential.bearer(os.environ["ARCLODE_API_KEY"]), ) # Submit an inference job (input is a JSON string). submitted = await client.submit_job( "inference:image:generate", json.dumps({"prompt": "a red fox on a basalt cliff", "model": "fal-ai/flux-2-pro"}), ) # Poll until the run reaches a terminal state. status = await client.job_status(submitted.run_id) while not status.terminal: await asyncio.sleep(1) status = await client.job_status(submitted.run_id) print(status.raw_json) # the finished job carries output.urls asyncio.run(main())cargo add arclode-sdkmain.rs
rust
use arclode_sdk::{Client, Credential};use serde_json::json;use std::time::Duration; #[tokio::main]async fn main() -> arclode_sdk::Result<()> { // One pooled, keep-alive client — build it once, reuse it for every call. let client = Client::builder("https://api.arclode.com") .credential(Credential::bearer(std::env::var("ARCLODE_API_KEY").unwrap())) .build()?; // Submit an inference job; input is forwarded verbatim to the worker. let submitted = client .submit_job( "inference:image:generate", json!({ "prompt": "a red fox on a basalt cliff", "model": "fal-ai/flux-2-pro" }), ) .await?; // Poll until the run reaches a terminal state. let mut status = client.job_status(submitted.run_id).await?; while !status.is_terminal() { tokio::time::sleep(Duration::from_secs(1)).await; status = client.job_status(submitted.run_id).await?; } // The finished job's output carries the durable artifact urls. println!("{:?}", status.output()); Ok(())}cargo build --release -p arclode_sdk_ffi-c · #include "arclode_sdk_ffi.h"quickstart.c
c
#include <stdio.h>#include <stdlib.h>#include "arclode_sdk_ffi.h" int main(void) { // One client handle — construct it, then configure the base URL + Arclode key. arclode_sdk_ffi_ArclodeSdk *client = arclode_sdk_ffi_ArclodeSdk_new_client(); if (arclode_sdk_ffi_ArclodeSdk_configure( client, "https://api.arclode.com", getenv("ARCLODE_API_KEY")) != 0) { fprintf(stderr, "configure: %s\n", arclode_sdk_ffi_last_error_message()); return 1; } // Submit an inference job — input is a JSON string, forwarded to the worker. // The out-param is an owned JSON string you must release with string_free. char *out = NULL; const char *input = "{\"prompt\":\"a red fox on a basalt cliff\",\"model\":\"fal-ai/flux-2-pro\"}"; if (arclode_sdk_ffi_ArclodeSdk_submit_job( client, "inference:image:generate", input, &out) != 0) { fprintf(stderr, "submit: %s\n", arclode_sdk_ffi_last_error_message()); arclode_sdk_ffi_ArclodeSdk_free(client); return 1; } printf("submitted: %s\n", out); // { "run_id": "...", "class": "...", "priority": ... } arclode_sdk_ffi_string_free(out); out = NULL; // Poll GET /v1/jobs/{id} until terminal (parse run_id from the submit JSON // with your JSON library of choice). A finished job carries output.urls. if (arclode_sdk_ffi_ArclodeSdk_job_status(client, "<run-id>", &out) == 0) { printf("status: %s\n", out); arclode_sdk_ffi_string_free(out); } arclode_sdk_ffi_ArclodeSdk_free(client); return 0;}any HTTP client — no SDK requiredquickstart.sh
bash
# 1. Submit a job — a 202 with { run_id, class, priority }.RUN=$(curl -sS -X POST "https://api.arclode.com/v1/jobs" \ -H "Authorization: Bearer $ARCLODE_API_KEY" \ -H 'Content-Type: application/json' \ -d '{ "kind": "inference:image:generate", "input": { "prompt": "a red fox on a basalt cliff", "model": "fal-ai/flux-2-pro" } }' | jq -r .run_id) # 2. Fetch the result — poll GET /v1/jobs/{id} until terminal.# A finished job carries output.urls (the durable artifact URLs).curl -sS "https://api.arclode.com/v1/jobs/$RUN" \ -H "Authorization: Bearer $ARCLODE_API_KEY"
GET /v1/jobs/{run_id}/events — decoded frame by frame as it arrives. In the SDKs that isjobEvents (Node (err, event)callback), job_events (Pythonasync for), andjobEvents(runId:observer:) (Swift / Kotlin EventObserver, returning a cancelable stream handle).stream.sh
bash
curl -N "https://api.arclode.com/v1/jobs/$RUN/events" \ -H "Authorization: Bearer $ARCLODE_API_KEY" \ -H 'Accept: text/event-stream'
kind you pass toPOST /v1/jobs. The catalogue is discoverable at runtime —GET /v1/capabilities is the live source of truth, and reports a worker count per kind (its entries are built only from workers actually connected right now). We label below what the network routes today versus what is still coming online, so you never have to guess.
inference:image:generate
inference:3d:image-to-mesh
inference:3d:text-to-mesh
inference:video:generate
inference:texture:generate
inference:rig
GET /v1/capabilitiesfor a non-zero worker count before you depend on one.
inference:llm:text-generate
inference:audio:music-generate
inference:audio:sfx-generate
inference:audio:text-to-speech
inference:audio:transcribe
POST /v1/tools/definitions registers a custom HTTP (or webhook) tool. The gateway validates the JSON-Schema, requires an https URL behind its SSRF guard, and enforces name uniqueness — then the tool surfaces to your agents as custom:<id>. The SDKs expose this as register_tool /registerTool.register-tool.sh
bash
curl -sS -X POST "https://api.arclode.com/v1/tools/definitions" \ -H "Authorization: Bearer $ARCLODE_API_KEY" \ -H 'Content-Type: application/json' \ -d '{ "name": "current-weather", "description": "Look up the current weather for a city.", "kind": "http", "method": "GET", "url": "https://api.example.com/weather", "inputSchema": { "type": "object", "properties": { "city": { "type": "string" } }, "required": ["city"] }, "auth": { "type": "bearer", "token": "$WEATHER_API_TOKEN" } }'
POST /v1/bots takes a model, a system prompt, and the tool ids it may call. The gateway creates and auto-publishes the backing single-agent flow and returns the bot with an embedToken and achatUrl — embed it in your app, or open the chat URL directly.create-bot.sh
bash
curl -sS -X POST "https://api.arclode.com/v1/bots" \ -H "Authorization: Bearer $ARCLODE_API_KEY" \ -H 'Content-Type: application/json' \ -d '{ "name": "Support Assistant", "model": "openai/gpt-oss-20b", "systemPrompt": "You are a concise, friendly in-game support assistant.", "tools": ["custom:<your-tool-id>"], "greeting": "Hi! How can I help?", "allowedOrigins": ["https://your-app.example"] }'# -> { id, embedToken, chatUrl, invokeUrl, wsUrl, ... } — embed it with the# embedToken, or open chatUrl directly.
GET /v1/capabilities for a live worker before you point production traffic at one.
GET /v1/network/capacity.