curl --request POST \
--url https://conigma-tool-server-production.up.railway.app/api/tool/{toolId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"input": {
"url": "https://www.instagram.com/nasa"
},
"webhook": "https://example.com/connie-webhook"
}
'import requests
url = "https://conigma-tool-server-production.up.railway.app/api/tool/{toolId}"
payload = {
"input": { "url": "https://www.instagram.com/nasa" },
"webhook": "https://example.com/connie-webhook"
}
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({
input: {url: 'https://www.instagram.com/nasa'},
webhook: 'https://example.com/connie-webhook'
})
};
fetch('https://conigma-tool-server-production.up.railway.app/api/tool/{toolId}', 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://conigma-tool-server-production.up.railway.app/api/tool/{toolId}",
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([
'input' => [
'url' => 'https://www.instagram.com/nasa'
],
'webhook' => 'https://example.com/connie-webhook'
]),
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://conigma-tool-server-production.up.railway.app/api/tool/{toolId}"
payload := strings.NewReader("{\n \"input\": {\n \"url\": \"https://www.instagram.com/nasa\"\n },\n \"webhook\": \"https://example.com/connie-webhook\"\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://conigma-tool-server-production.up.railway.app/api/tool/{toolId}")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": {\n \"url\": \"https://www.instagram.com/nasa\"\n },\n \"webhook\": \"https://example.com/connie-webhook\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://conigma-tool-server-production.up.railway.app/api/tool/{toolId}")
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 \"input\": {\n \"url\": \"https://www.instagram.com/nasa\"\n },\n \"webhook\": \"https://example.com/connie-webhook\"\n}"
response = http.request(request)
puts response.read_body{
"status": "completed",
"ok": true,
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toolId": "<string>",
"result": "<unknown>",
"resultRef": {
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"error": {
"code": "insufficient_credits",
"message": "<string>",
"retryable": true
},
"billing": {
"chargedCredits": 123,
"items": [
{
"toolId": "<string>",
"summary": "<string>",
"chargedCredits": 123,
"status": "charged",
"externalBilling": "may_apply",
"heldCredits": 123
}
],
"lowBalance": {
"balance": 123,
"message": "<string>",
"nextStep": "<string>",
"url": "<string>"
}
},
"replayed": true,
"chargedThisRequest": 123,
"recovery": {
"toolId": "get-generation",
"input": {
"recoveryId": "<string>"
}
}
}{
"invocationId": "7c0e5a52-1f7a-4e0e-9a51-0d6b2f7d1c11",
"toolId": "instagram-profiles-collect-by-url",
"status": "in_progress",
"ok": false,
"replayed": false
}{
"status": "completed",
"ok": true,
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toolId": "<string>",
"result": "<unknown>",
"resultRef": {
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"error": {
"code": "insufficient_credits",
"message": "<string>",
"retryable": true
},
"billing": {
"chargedCredits": 123,
"items": [
{
"toolId": "<string>",
"summary": "<string>",
"chargedCredits": 123,
"status": "charged",
"externalBilling": "may_apply",
"heldCredits": 123
}
],
"lowBalance": {
"balance": 123,
"message": "<string>",
"nextStep": "<string>",
"url": "<string>"
}
},
"replayed": true,
"chargedThisRequest": 123,
"recovery": {
"toolId": "get-generation",
"input": {
"recoveryId": "<string>"
}
}
}{
"status": "completed",
"ok": true,
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toolId": "<string>",
"result": "<unknown>",
"resultRef": {
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"error": {
"code": "insufficient_credits",
"message": "<string>",
"retryable": true
},
"billing": {
"chargedCredits": 123,
"items": [
{
"toolId": "<string>",
"summary": "<string>",
"chargedCredits": 123,
"status": "charged",
"externalBilling": "may_apply",
"heldCredits": 123
}
],
"lowBalance": {
"balance": 123,
"message": "<string>",
"nextStep": "<string>",
"url": "<string>"
}
},
"replayed": true,
"chargedThisRequest": 123,
"recovery": {
"toolId": "get-generation",
"input": {
"recoveryId": "<string>"
}
}
}{
"status": "completed",
"ok": true,
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toolId": "<string>",
"result": "<unknown>",
"resultRef": {
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"error": {
"code": "insufficient_credits",
"message": "<string>",
"retryable": true
},
"billing": {
"chargedCredits": 123,
"items": [
{
"toolId": "<string>",
"summary": "<string>",
"chargedCredits": 123,
"status": "charged",
"externalBilling": "may_apply",
"heldCredits": 123
}
],
"lowBalance": {
"balance": 123,
"message": "<string>",
"nextStep": "<string>",
"url": "<string>"
}
},
"replayed": true,
"chargedThisRequest": 123,
"recovery": {
"toolId": "get-generation",
"input": {
"recoveryId": "<string>"
}
}
}{
"status": "completed",
"ok": true,
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toolId": "<string>",
"result": "<unknown>",
"resultRef": {
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"error": {
"code": "insufficient_credits",
"message": "<string>",
"retryable": true
},
"billing": {
"chargedCredits": 123,
"items": [
{
"toolId": "<string>",
"summary": "<string>",
"chargedCredits": 123,
"status": "charged",
"externalBilling": "may_apply",
"heldCredits": 123
}
],
"lowBalance": {
"balance": 123,
"message": "<string>",
"nextStep": "<string>",
"url": "<string>"
}
},
"replayed": true,
"chargedThisRequest": 123,
"recovery": {
"toolId": "get-generation",
"input": {
"recoveryId": "<string>"
}
}
}{
"status": "completed",
"ok": true,
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toolId": "<string>",
"result": "<unknown>",
"resultRef": {
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"error": {
"code": "insufficient_credits",
"message": "<string>",
"retryable": true
},
"billing": {
"chargedCredits": 123,
"items": [
{
"toolId": "<string>",
"summary": "<string>",
"chargedCredits": 123,
"status": "charged",
"externalBilling": "may_apply",
"heldCredits": 123
}
],
"lowBalance": {
"balance": 123,
"message": "<string>",
"nextStep": "<string>",
"url": "<string>"
}
},
"replayed": true,
"chargedThisRequest": 123,
"recovery": {
"toolId": "get-generation",
"input": {
"recoveryId": "<string>"
}
}
}{
"status": "completed",
"ok": true,
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toolId": "<string>",
"result": "<unknown>",
"resultRef": {
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"error": {
"code": "insufficient_credits",
"message": "<string>",
"retryable": true
},
"billing": {
"chargedCredits": 123,
"items": [
{
"toolId": "<string>",
"summary": "<string>",
"chargedCredits": 123,
"status": "charged",
"externalBilling": "may_apply",
"heldCredits": 123
}
],
"lowBalance": {
"balance": 123,
"message": "<string>",
"nextStep": "<string>",
"url": "<string>"
}
},
"replayed": true,
"chargedThisRequest": 123,
"recovery": {
"toolId": "get-generation",
"input": {
"recoveryId": "<string>"
}
}
}{
"status": "completed",
"ok": true,
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toolId": "<string>",
"result": "<unknown>",
"resultRef": {
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"error": {
"code": "insufficient_credits",
"message": "<string>",
"retryable": true
},
"billing": {
"chargedCredits": 123,
"items": [
{
"toolId": "<string>",
"summary": "<string>",
"chargedCredits": 123,
"status": "charged",
"externalBilling": "may_apply",
"heldCredits": 123
}
],
"lowBalance": {
"balance": 123,
"message": "<string>",
"nextStep": "<string>",
"url": "<string>"
}
},
"replayed": true,
"chargedThisRequest": 123,
"recovery": {
"toolId": "get-generation",
"input": {
"recoveryId": "<string>"
}
}
}{
"status": "completed",
"ok": true,
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toolId": "<string>",
"result": "<unknown>",
"resultRef": {
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"error": {
"code": "insufficient_credits",
"message": "<string>",
"retryable": true
},
"billing": {
"chargedCredits": 123,
"items": [
{
"toolId": "<string>",
"summary": "<string>",
"chargedCredits": 123,
"status": "charged",
"externalBilling": "may_apply",
"heldCredits": 123
}
],
"lowBalance": {
"balance": 123,
"message": "<string>",
"nextStep": "<string>",
"url": "<string>"
}
},
"replayed": true,
"chargedThisRequest": 123,
"recovery": {
"toolId": "get-generation",
"input": {
"recoveryId": "<string>"
}
}
}{
"status": "completed",
"ok": true,
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toolId": "<string>",
"result": "<unknown>",
"resultRef": {
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"error": {
"code": "insufficient_credits",
"message": "<string>",
"retryable": true
},
"billing": {
"chargedCredits": 123,
"items": [
{
"toolId": "<string>",
"summary": "<string>",
"chargedCredits": 123,
"status": "charged",
"externalBilling": "may_apply",
"heldCredits": 123
}
],
"lowBalance": {
"balance": 123,
"message": "<string>",
"nextStep": "<string>",
"url": "<string>"
}
},
"replayed": true,
"chargedThisRequest": 123,
"recovery": {
"toolId": "get-generation",
"input": {
"recoveryId": "<string>"
}
}
}Run a tool
Runs the tool once per Idempotency-Key. Connie waits up to 25 seconds: a successful call that ends sooner answers 200 with its outcome; a longer one answers 202 with status: in_progress, and keeps running. Then poll GET /api/tool-invocations/{invocationId} every few seconds, or pass webhook and Connie POSTs the outcome when the call ends. Sending the same request again with the same key returns the same operation (marked replayed) and never runs or charges a completed operation twice. A request that did not run and has error.retryable: true may be attempted again with the same key.
curl --request POST \
--url https://conigma-tool-server-production.up.railway.app/api/tool/{toolId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"input": {
"url": "https://www.instagram.com/nasa"
},
"webhook": "https://example.com/connie-webhook"
}
'import requests
url = "https://conigma-tool-server-production.up.railway.app/api/tool/{toolId}"
payload = {
"input": { "url": "https://www.instagram.com/nasa" },
"webhook": "https://example.com/connie-webhook"
}
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({
input: {url: 'https://www.instagram.com/nasa'},
webhook: 'https://example.com/connie-webhook'
})
};
fetch('https://conigma-tool-server-production.up.railway.app/api/tool/{toolId}', 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://conigma-tool-server-production.up.railway.app/api/tool/{toolId}",
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([
'input' => [
'url' => 'https://www.instagram.com/nasa'
],
'webhook' => 'https://example.com/connie-webhook'
]),
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://conigma-tool-server-production.up.railway.app/api/tool/{toolId}"
payload := strings.NewReader("{\n \"input\": {\n \"url\": \"https://www.instagram.com/nasa\"\n },\n \"webhook\": \"https://example.com/connie-webhook\"\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://conigma-tool-server-production.up.railway.app/api/tool/{toolId}")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": {\n \"url\": \"https://www.instagram.com/nasa\"\n },\n \"webhook\": \"https://example.com/connie-webhook\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://conigma-tool-server-production.up.railway.app/api/tool/{toolId}")
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 \"input\": {\n \"url\": \"https://www.instagram.com/nasa\"\n },\n \"webhook\": \"https://example.com/connie-webhook\"\n}"
response = http.request(request)
puts response.read_body{
"status": "completed",
"ok": true,
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toolId": "<string>",
"result": "<unknown>",
"resultRef": {
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"error": {
"code": "insufficient_credits",
"message": "<string>",
"retryable": true
},
"billing": {
"chargedCredits": 123,
"items": [
{
"toolId": "<string>",
"summary": "<string>",
"chargedCredits": 123,
"status": "charged",
"externalBilling": "may_apply",
"heldCredits": 123
}
],
"lowBalance": {
"balance": 123,
"message": "<string>",
"nextStep": "<string>",
"url": "<string>"
}
},
"replayed": true,
"chargedThisRequest": 123,
"recovery": {
"toolId": "get-generation",
"input": {
"recoveryId": "<string>"
}
}
}{
"invocationId": "7c0e5a52-1f7a-4e0e-9a51-0d6b2f7d1c11",
"toolId": "instagram-profiles-collect-by-url",
"status": "in_progress",
"ok": false,
"replayed": false
}{
"status": "completed",
"ok": true,
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toolId": "<string>",
"result": "<unknown>",
"resultRef": {
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"error": {
"code": "insufficient_credits",
"message": "<string>",
"retryable": true
},
"billing": {
"chargedCredits": 123,
"items": [
{
"toolId": "<string>",
"summary": "<string>",
"chargedCredits": 123,
"status": "charged",
"externalBilling": "may_apply",
"heldCredits": 123
}
],
"lowBalance": {
"balance": 123,
"message": "<string>",
"nextStep": "<string>",
"url": "<string>"
}
},
"replayed": true,
"chargedThisRequest": 123,
"recovery": {
"toolId": "get-generation",
"input": {
"recoveryId": "<string>"
}
}
}{
"status": "completed",
"ok": true,
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toolId": "<string>",
"result": "<unknown>",
"resultRef": {
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"error": {
"code": "insufficient_credits",
"message": "<string>",
"retryable": true
},
"billing": {
"chargedCredits": 123,
"items": [
{
"toolId": "<string>",
"summary": "<string>",
"chargedCredits": 123,
"status": "charged",
"externalBilling": "may_apply",
"heldCredits": 123
}
],
"lowBalance": {
"balance": 123,
"message": "<string>",
"nextStep": "<string>",
"url": "<string>"
}
},
"replayed": true,
"chargedThisRequest": 123,
"recovery": {
"toolId": "get-generation",
"input": {
"recoveryId": "<string>"
}
}
}{
"status": "completed",
"ok": true,
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toolId": "<string>",
"result": "<unknown>",
"resultRef": {
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"error": {
"code": "insufficient_credits",
"message": "<string>",
"retryable": true
},
"billing": {
"chargedCredits": 123,
"items": [
{
"toolId": "<string>",
"summary": "<string>",
"chargedCredits": 123,
"status": "charged",
"externalBilling": "may_apply",
"heldCredits": 123
}
],
"lowBalance": {
"balance": 123,
"message": "<string>",
"nextStep": "<string>",
"url": "<string>"
}
},
"replayed": true,
"chargedThisRequest": 123,
"recovery": {
"toolId": "get-generation",
"input": {
"recoveryId": "<string>"
}
}
}{
"status": "completed",
"ok": true,
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toolId": "<string>",
"result": "<unknown>",
"resultRef": {
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"error": {
"code": "insufficient_credits",
"message": "<string>",
"retryable": true
},
"billing": {
"chargedCredits": 123,
"items": [
{
"toolId": "<string>",
"summary": "<string>",
"chargedCredits": 123,
"status": "charged",
"externalBilling": "may_apply",
"heldCredits": 123
}
],
"lowBalance": {
"balance": 123,
"message": "<string>",
"nextStep": "<string>",
"url": "<string>"
}
},
"replayed": true,
"chargedThisRequest": 123,
"recovery": {
"toolId": "get-generation",
"input": {
"recoveryId": "<string>"
}
}
}{
"status": "completed",
"ok": true,
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toolId": "<string>",
"result": "<unknown>",
"resultRef": {
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"error": {
"code": "insufficient_credits",
"message": "<string>",
"retryable": true
},
"billing": {
"chargedCredits": 123,
"items": [
{
"toolId": "<string>",
"summary": "<string>",
"chargedCredits": 123,
"status": "charged",
"externalBilling": "may_apply",
"heldCredits": 123
}
],
"lowBalance": {
"balance": 123,
"message": "<string>",
"nextStep": "<string>",
"url": "<string>"
}
},
"replayed": true,
"chargedThisRequest": 123,
"recovery": {
"toolId": "get-generation",
"input": {
"recoveryId": "<string>"
}
}
}{
"status": "completed",
"ok": true,
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toolId": "<string>",
"result": "<unknown>",
"resultRef": {
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"error": {
"code": "insufficient_credits",
"message": "<string>",
"retryable": true
},
"billing": {
"chargedCredits": 123,
"items": [
{
"toolId": "<string>",
"summary": "<string>",
"chargedCredits": 123,
"status": "charged",
"externalBilling": "may_apply",
"heldCredits": 123
}
],
"lowBalance": {
"balance": 123,
"message": "<string>",
"nextStep": "<string>",
"url": "<string>"
}
},
"replayed": true,
"chargedThisRequest": 123,
"recovery": {
"toolId": "get-generation",
"input": {
"recoveryId": "<string>"
}
}
}{
"status": "completed",
"ok": true,
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toolId": "<string>",
"result": "<unknown>",
"resultRef": {
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"error": {
"code": "insufficient_credits",
"message": "<string>",
"retryable": true
},
"billing": {
"chargedCredits": 123,
"items": [
{
"toolId": "<string>",
"summary": "<string>",
"chargedCredits": 123,
"status": "charged",
"externalBilling": "may_apply",
"heldCredits": 123
}
],
"lowBalance": {
"balance": 123,
"message": "<string>",
"nextStep": "<string>",
"url": "<string>"
}
},
"replayed": true,
"chargedThisRequest": 123,
"recovery": {
"toolId": "get-generation",
"input": {
"recoveryId": "<string>"
}
}
}{
"status": "completed",
"ok": true,
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toolId": "<string>",
"result": "<unknown>",
"resultRef": {
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"error": {
"code": "insufficient_credits",
"message": "<string>",
"retryable": true
},
"billing": {
"chargedCredits": 123,
"items": [
{
"toolId": "<string>",
"summary": "<string>",
"chargedCredits": 123,
"status": "charged",
"externalBilling": "may_apply",
"heldCredits": 123
}
],
"lowBalance": {
"balance": 123,
"message": "<string>",
"nextStep": "<string>",
"url": "<string>"
}
},
"replayed": true,
"chargedThisRequest": 123,
"recovery": {
"toolId": "get-generation",
"input": {
"recoveryId": "<string>"
}
}
}{
"status": "completed",
"ok": true,
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"toolId": "<string>",
"result": "<unknown>",
"resultRef": {
"invocationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"error": {
"code": "insufficient_credits",
"message": "<string>",
"retryable": true
},
"billing": {
"chargedCredits": 123,
"items": [
{
"toolId": "<string>",
"summary": "<string>",
"chargedCredits": 123,
"status": "charged",
"externalBilling": "may_apply",
"heldCredits": 123
}
],
"lowBalance": {
"balance": 123,
"message": "<string>",
"nextStep": "<string>",
"url": "<string>"
}
},
"replayed": true,
"chargedThisRequest": 123,
"recovery": {
"toolId": "get-generation",
"input": {
"recoveryId": "<string>"
}
}
}Authorizations
A workspace API key from Settings → Developers → API keys, sent as Authorization: Bearer sk_… (or X-API-Key: sk_…). It acts as one workspace member and uses the workspace's credits.
Headers
One value per logical operation, for example a UUID you generate and keep. 8 to 200 characters: letters, digits and . _ : ~ + / = -. Reuse it on every retry of that operation; a new key runs the tool again.
8 - 200Path Parameters
The tool's id, exactly as search returns it, URL-encoded once (a / becomes %2F).
Body
The tool's inputs, as described by its inputSchema.
An https URL, at most 2,048 characters once encoded, whose host resolves to a public internet address. When the call ends, Connie POSTs a signed tool_invocation.* event to it. See the webhook in this reference.
2048Response
The call ended within the wait and the tool succeeded (ok: true). A tool that ran and failed answers 400 with tool_failed.
completed: the tool ran (ok says whether it succeeded). in_progress: still running. not_executed: nothing ran and nothing was charged. unknown_outcome: the tool may have run; do not run it again automatically.
completed, in_progress, not_executed, unknown_outcome The operation's id. Keep it.
The tool's output, when ok is true and it is under 1 MiB.
Present instead of result when the output is over 1 MiB. Fetch it with ?result=full.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
true when this answer repeats an earlier request with the same key.
Credits charged by this request; 0 on a replay.
For media generation only: how to recover the result of an unknown_outcome.
Show child attributes
Show child attributes