cURL
curl --request POST \
--url https://chat.aomi.dev/v1/agent/chat/{sessionId}/interrupt \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"turnId": "<string>"
}
'import requests
url = "https://chat.aomi.dev/v1/agent/chat/{sessionId}/interrupt"
payload = { "turnId": "<string>" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({turnId: '<string>'})
};
fetch('https://chat.aomi.dev/v1/agent/chat/{sessionId}/interrupt', 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://chat.aomi.dev/v1/agent/chat/{sessionId}/interrupt",
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([
'turnId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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 := "https://chat.aomi.dev/v1/agent/chat/{sessionId}/interrupt"
payload := strings.NewReader("{\n \"turnId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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("https://chat.aomi.dev/v1/agent/chat/{sessionId}/interrupt")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"turnId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://chat.aomi.dev/v1/agent/chat/{sessionId}/interrupt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"turnId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"session_id": "<string>",
"cursor": "<string>",
"events": [
{
"event_id": "<string>",
"sequence": 2,
"turn_id": "<string>",
"occurred_at": 123,
"type": "message",
"sender": "user",
"content": "<string>",
"runtime_sequence": 1,
"message_key": "<string>",
"tool_call_id": "<string>",
"tool_result": "<array>",
"tool_name": "<string>",
"tool_arguments": "<unknown>",
"is_streaming": true
}
],
"has_more": true,
"commits": [
{
"version": 2,
"commit_id": "<string>",
"thread_id": "<string>",
"stage_id": "<string>",
"chain_family": "evm",
"chain_ref": "<string>",
"signer": "<string>",
"broadcaster": "wallet",
"state": "needs_signature",
"transaction_id": "<string>",
"failure_code": "<string>",
"batch": {
"batch_id": "<string>",
"index": 1,
"ordered_stage_ids": [
"<string>"
],
"ordered_commit_ids": [
"<string>"
],
"sources": [
{
"thread_id": "<string>",
"chain_family": "evm",
"chain_ref": "<string>",
"stage_id": "<string>",
"source_id": 1
}
],
"predecessor_commit_id": "<string>",
"review_digest": "<string>"
},
"review": {
"version": 2,
"revision": 2,
"digest": "<string>",
"request": {
"type": "execute_evm",
"transactions": [
{
"chain_id": 2,
"from": "<string>",
"to": "<string>",
"data": "<string>",
"label": "<string>",
"kind": "<string>",
"value": "<string>",
"gas": "<string>",
"protocol": "<string>",
"expires_at": 123,
"last_batch_status": "<string>",
"pending_tx_id": 123,
"current_lifecycle": "<string>",
"broadcaster": "wallet",
"fee_outcome": {
"kind": "flat"
}
}
],
"simulation": {
"status": "passed",
"balanceChanges": [
{
"asset": "<string>",
"amount": "<string>",
"account": "<string>",
"direction": "in",
"symbol": "<string>",
"decimals": 123,
"chainId": 123,
"cluster": "<string>",
"standard": "native",
"name": "<string>",
"tokenId": "<string>",
"counterparty": "<string>",
"step": 2
}
],
"approvals": [
{
"account": "<string>",
"spender": "<string>",
"asset": "<string>",
"kind": "allowance",
"standard": "native",
"amount": "<string>",
"approved": true,
"unlimited": true,
"tokenId": "<string>",
"symbol": "<string>",
"name": "<string>",
"decimals": 123,
"chainId": 123,
"step": 2
}
],
"fees": [
{
"asset": "<string>",
"amount": "<string>",
"account": "<string>",
"symbol": "<string>",
"decimals": 123,
"chainId": 123,
"cluster": "<string>",
"kind": "<string>"
}
],
"warnings": [
"<string>"
],
"guards": [
{
"name": "<string>",
"status": "passed",
"message": "<string>"
}
],
"gas": {
"units": "<string>",
"priceWei": "<string>",
"nativeCost": "<string>"
},
"logs": [
{
"address": "<string>",
"topics": [
"<string>"
],
"data": "<string>",
"chainId": 123,
"cluster": "<string>",
"step": 2
}
]
}
},
"legs": [
{
"type": "execute_evm",
"transactions": [
{
"chain_id": 2,
"from": "<string>",
"to": "<string>",
"data": "<string>",
"label": "<string>",
"kind": "<string>",
"value": "<string>",
"gas": "<string>",
"protocol": "<string>",
"expires_at": 123,
"last_batch_status": "<string>",
"pending_tx_id": 123,
"current_lifecycle": "<string>",
"broadcaster": "wallet",
"fee_outcome": {
"kind": "flat"
}
}
],
"simulation": {
"status": "passed",
"balanceChanges": [
{
"asset": "<string>",
"amount": "<string>",
"account": "<string>",
"direction": "in",
"symbol": "<string>",
"decimals": 123,
"chainId": 123,
"cluster": "<string>",
"standard": "native",
"name": "<string>",
"tokenId": "<string>",
"counterparty": "<string>",
"step": 2
}
],
"approvals": [
{
"account": "<string>",
"spender": "<string>",
"asset": "<string>",
"kind": "allowance",
"standard": "native",
"amount": "<string>",
"approved": true,
"unlimited": true,
"tokenId": "<string>",
"symbol": "<string>",
"name": "<string>",
"decimals": 123,
"chainId": 123,
"step": 2
}
],
"fees": [
{
"asset": "<string>",
"amount": "<string>",
"account": "<string>",
"symbol": "<string>",
"decimals": 123,
"chainId": 123,
"cluster": "<string>",
"kind": "<string>"
}
],
"warnings": [
"<string>"
],
"guards": [
{
"name": "<string>",
"status": "passed",
"message": "<string>"
}
],
"gas": {
"units": "<string>",
"priceWei": "<string>",
"nativeCost": "<string>"
},
"logs": [
{
"address": "<string>",
"topics": [
"<string>"
],
"data": "<string>",
"chainId": 123,
"cluster": "<string>",
"step": 2
}
]
}
}
]
},
"wallet_attempt": {
"attempt_id": "<string>",
"transport": "sign_and_broadcast",
"state": "awaiting_wallet",
"transaction_id": "<string>",
"failure_code": "<string>"
},
"action": {
"kind": "sign",
"payload": {
"kind": "evm_transaction",
"chain_id": 123,
"signer": "<string>",
"nonce": 123,
"transaction": {
"to": "<string>",
"value": "<string>",
"data": "<string>",
"gas_limit": 123,
"max_fee_per_gas": "<string>",
"max_priority_fee_per_gas": "<string>"
}
}
},
"supported_transports": [
"sign_and_broadcast"
]
}
]
}{
"error": "<unknown>"
}{
"error": "<unknown>"
}{
"error": "<unknown>"
}Agent
Post v1agentchat interrupt
POST
/
v1
/
agent
/
chat
/
{sessionId}
/
interrupt
cURL
curl --request POST \
--url https://chat.aomi.dev/v1/agent/chat/{sessionId}/interrupt \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"turnId": "<string>"
}
'import requests
url = "https://chat.aomi.dev/v1/agent/chat/{sessionId}/interrupt"
payload = { "turnId": "<string>" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({turnId: '<string>'})
};
fetch('https://chat.aomi.dev/v1/agent/chat/{sessionId}/interrupt', 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://chat.aomi.dev/v1/agent/chat/{sessionId}/interrupt",
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([
'turnId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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 := "https://chat.aomi.dev/v1/agent/chat/{sessionId}/interrupt"
payload := strings.NewReader("{\n \"turnId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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("https://chat.aomi.dev/v1/agent/chat/{sessionId}/interrupt")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"turnId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://chat.aomi.dev/v1/agent/chat/{sessionId}/interrupt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"turnId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"session_id": "<string>",
"cursor": "<string>",
"events": [
{
"event_id": "<string>",
"sequence": 2,
"turn_id": "<string>",
"occurred_at": 123,
"type": "message",
"sender": "user",
"content": "<string>",
"runtime_sequence": 1,
"message_key": "<string>",
"tool_call_id": "<string>",
"tool_result": "<array>",
"tool_name": "<string>",
"tool_arguments": "<unknown>",
"is_streaming": true
}
],
"has_more": true,
"commits": [
{
"version": 2,
"commit_id": "<string>",
"thread_id": "<string>",
"stage_id": "<string>",
"chain_family": "evm",
"chain_ref": "<string>",
"signer": "<string>",
"broadcaster": "wallet",
"state": "needs_signature",
"transaction_id": "<string>",
"failure_code": "<string>",
"batch": {
"batch_id": "<string>",
"index": 1,
"ordered_stage_ids": [
"<string>"
],
"ordered_commit_ids": [
"<string>"
],
"sources": [
{
"thread_id": "<string>",
"chain_family": "evm",
"chain_ref": "<string>",
"stage_id": "<string>",
"source_id": 1
}
],
"predecessor_commit_id": "<string>",
"review_digest": "<string>"
},
"review": {
"version": 2,
"revision": 2,
"digest": "<string>",
"request": {
"type": "execute_evm",
"transactions": [
{
"chain_id": 2,
"from": "<string>",
"to": "<string>",
"data": "<string>",
"label": "<string>",
"kind": "<string>",
"value": "<string>",
"gas": "<string>",
"protocol": "<string>",
"expires_at": 123,
"last_batch_status": "<string>",
"pending_tx_id": 123,
"current_lifecycle": "<string>",
"broadcaster": "wallet",
"fee_outcome": {
"kind": "flat"
}
}
],
"simulation": {
"status": "passed",
"balanceChanges": [
{
"asset": "<string>",
"amount": "<string>",
"account": "<string>",
"direction": "in",
"symbol": "<string>",
"decimals": 123,
"chainId": 123,
"cluster": "<string>",
"standard": "native",
"name": "<string>",
"tokenId": "<string>",
"counterparty": "<string>",
"step": 2
}
],
"approvals": [
{
"account": "<string>",
"spender": "<string>",
"asset": "<string>",
"kind": "allowance",
"standard": "native",
"amount": "<string>",
"approved": true,
"unlimited": true,
"tokenId": "<string>",
"symbol": "<string>",
"name": "<string>",
"decimals": 123,
"chainId": 123,
"step": 2
}
],
"fees": [
{
"asset": "<string>",
"amount": "<string>",
"account": "<string>",
"symbol": "<string>",
"decimals": 123,
"chainId": 123,
"cluster": "<string>",
"kind": "<string>"
}
],
"warnings": [
"<string>"
],
"guards": [
{
"name": "<string>",
"status": "passed",
"message": "<string>"
}
],
"gas": {
"units": "<string>",
"priceWei": "<string>",
"nativeCost": "<string>"
},
"logs": [
{
"address": "<string>",
"topics": [
"<string>"
],
"data": "<string>",
"chainId": 123,
"cluster": "<string>",
"step": 2
}
]
}
},
"legs": [
{
"type": "execute_evm",
"transactions": [
{
"chain_id": 2,
"from": "<string>",
"to": "<string>",
"data": "<string>",
"label": "<string>",
"kind": "<string>",
"value": "<string>",
"gas": "<string>",
"protocol": "<string>",
"expires_at": 123,
"last_batch_status": "<string>",
"pending_tx_id": 123,
"current_lifecycle": "<string>",
"broadcaster": "wallet",
"fee_outcome": {
"kind": "flat"
}
}
],
"simulation": {
"status": "passed",
"balanceChanges": [
{
"asset": "<string>",
"amount": "<string>",
"account": "<string>",
"direction": "in",
"symbol": "<string>",
"decimals": 123,
"chainId": 123,
"cluster": "<string>",
"standard": "native",
"name": "<string>",
"tokenId": "<string>",
"counterparty": "<string>",
"step": 2
}
],
"approvals": [
{
"account": "<string>",
"spender": "<string>",
"asset": "<string>",
"kind": "allowance",
"standard": "native",
"amount": "<string>",
"approved": true,
"unlimited": true,
"tokenId": "<string>",
"symbol": "<string>",
"name": "<string>",
"decimals": 123,
"chainId": 123,
"step": 2
}
],
"fees": [
{
"asset": "<string>",
"amount": "<string>",
"account": "<string>",
"symbol": "<string>",
"decimals": 123,
"chainId": 123,
"cluster": "<string>",
"kind": "<string>"
}
],
"warnings": [
"<string>"
],
"guards": [
{
"name": "<string>",
"status": "passed",
"message": "<string>"
}
],
"gas": {
"units": "<string>",
"priceWei": "<string>",
"nativeCost": "<string>"
},
"logs": [
{
"address": "<string>",
"topics": [
"<string>"
],
"data": "<string>",
"chainId": 123,
"cluster": "<string>",
"step": 2
}
]
}
}
]
},
"wallet_attempt": {
"attempt_id": "<string>",
"transport": "sign_and_broadcast",
"state": "awaiting_wallet",
"transaction_id": "<string>",
"failure_code": "<string>"
},
"action": {
"kind": "sign",
"payload": {
"kind": "evm_transaction",
"chain_id": 123,
"signer": "<string>",
"nonce": 123,
"transaction": {
"to": "<string>",
"value": "<string>",
"data": "<string>",
"gas_limit": 123,
"max_fee_per_gas": "<string>",
"max_priority_fee_per_gas": "<string>"
}
}
},
"supported_transports": [
"sign_and_broadcast"
]
}
]
}{
"error": "<unknown>"
}{
"error": "<unknown>"
}{
"error": "<unknown>"
}Authorizations
Better Auth OAuth 2.1 authorization-code/device grants. Access tokens are exact-resource bound; the Portal BFF verifies them and delegates a downscoped internal bearer.
Headers
Required string length:
1 - 160Path Parameters
Maximum string length:
160Body
application/json
Last modified on September 24, 2026
Was this page helpful?