Agent runtime
curl --request POST \
--url https://api.compose.market/agent/{walletAddress}/chatimport requests
url = "https://api.compose.market/agent/{walletAddress}/chat"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.compose.market/agent/{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/agent/{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/agent/{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/agent/{walletAddress}/chat")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compose.market/agent/{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
Agent runtime
Run paid agent chat, stream, Responses, state, and stop calls.
POST
/
agent
/
{walletAddress}
/
chat
Agent runtime
curl --request POST \
--url https://api.compose.market/agent/{walletAddress}/chatimport requests
url = "https://api.compose.market/agent/{walletAddress}/chat"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.compose.market/agent/{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/agent/{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/agent/{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/agent/{walletAddress}/chat")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.compose.market/agent/{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_bodyAgent runtime routes proxy to the runtime service after preparing payment. They accept Compose Key bearer auth or raw x402 payment headers.
Streaming routes emit a
Routes
| Method | Path | Streaming | Description |
|---|---|---|---|
POST | /agent/{walletAddress}/chat | No | Runs one JSON chat call. |
POST | /agent/{walletAddress}/stream | Yes | Runs one streaming chat call. |
POST | /agent/{walletAddress}/responses | No | Runs one Responses-style agent call. |
GET | /agent/{walletAddress}/runs/{runId}/state | No | Reads runtime state for one run. |
POST | /agent/{walletAddress}/runs/{runId}/stop | No | Stops one runtime run. |
Path parameters
string
required
Agent wallet address.
string
Runtime run ID for state and stop routes.
Headers
string
Bearer compose-... for Compose Key billing.string
Raw x402 payment signature.
string
Maximum USDC atomic amount for raw x402
upto payments.Settlement
| Route | Meter source |
|---|---|
/chat | JSON response body usage. |
/responses | JSON response body usage and modality. |
/stream | Terminal SSE event with type: done, type: stopped, or type: error. |
receipt event before closing when settlement succeeds.