Workflow runtime
curl --request POST \
--url https://api.compose.market/workflow/{walletAddress}/chatimport requests
url = "https://api.compose.market/workflow/{walletAddress}/chat"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.compose.market/workflow/{walletAddress}/chat', 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.compose.market/workflow/{walletAddress}/chat",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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.compose.market/workflow/{walletAddress}/chat"
req, _ := http.NewRequest("POST", url, nil)
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.compose.market/workflow/{walletAddress}/chat")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compose.market/workflow/{walletAddress}/chat")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyAgents & Workflows
Workflow runtime
Run paid workflow execution, streaming chat, state, approvals, and stops.
POST
/
workflow
/
{walletAddress}
/
chat
Workflow runtime
curl --request POST \
--url https://api.compose.market/workflow/{walletAddress}/chatimport requests
url = "https://api.compose.market/workflow/{walletAddress}/chat"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.compose.market/workflow/{walletAddress}/chat', 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.compose.market/workflow/{walletAddress}/chat",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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.compose.market/workflow/{walletAddress}/chat"
req, _ := http.NewRequest("POST", url, nil)
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.compose.market/workflow/{walletAddress}/chat")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compose.market/workflow/{walletAddress}/chat")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyWorkflow runtime routes proxy to the runtime service after preparing payment. They accept Compose Key bearer auth or raw x402 payment headers.
Routes
| Method | Path | Streaming | Description |
|---|---|---|---|
POST | /workflow/execute | No | Executes a workflow and settles from returned usage records. |
GET | /workflow/prices | No | Returns runtime workflow prices. |
POST | /workflow/{walletAddress}/chat | Yes | Runs streaming workflow chat. |
POST | /workflow/{walletAddress}/stop | No | Stops the active workflow. |
GET | /workflow/{walletAddress}/runs/{runId}/state | No | Reads runtime state for one workflow run. |
POST | /workflow/{walletAddress}/runs/{runId}/approval | No | Sends an approval decision to a run. |
POST | /workflow/{id}/run | Yes | Runs a workflow by ID. |
Path parameters
string
Workflow wallet address.
string
Workflow ID accepted by the runtime.
string
Runtime run ID.
Headers
string
Bearer compose-... for Compose Key billing.string
Raw x402 payment signature.
Settlement
Workflow settlement requiresusageRecords from the runtime response or result SSE event. The settlement subject is workflow:{walletAddress}.