curl --request GET \
--url https://api.recoupable.dev/api/tasks/runs \
--header 'x-api-key: <api-key>'import requests
url = "https://api.recoupable.dev/api/tasks/runs"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.recoupable.dev/api/tasks/runs', 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.recoupable.dev/api/tasks/runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-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"
"net/http"
"io"
)
func main() {
url := "https://api.recoupable.dev/api/tasks/runs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.recoupable.dev/api/tasks/runs")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recoupable.dev/api/tasks/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"runs": [
{
"id": "<string>",
"taskIdentifier": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"idempotencyKey": "<string>",
"version": "<string>",
"isTest": true,
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"delayedUntil": "2023-11-07T05:31:56Z",
"ttl": "<unknown>",
"expiredAt": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"metadata": {},
"costInCents": 123,
"baseCostInCents": 123,
"durationMs": 123,
"env": {
"id": "<string>",
"name": "<string>",
"user": "<string>"
},
"depth": 123,
"batchId": "<string>",
"payload": "<unknown>",
"output": {
"videoSourceUrl": "<string>",
"imageUrl": "<string>",
"captionText": "<string>",
"template": "artist-caption-bedroom",
"lipsync": true,
"audio": {
"songTitle": "<string>",
"songFilename": "<string>",
"startSeconds": 123,
"durationSeconds": 123,
"clipLyrics": "<string>",
"clipMood": "<string>"
}
},
"error": {
"message": "<string>",
"name": "<string>",
"stackTrace": "<string>"
},
"attempts": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"error": {
"message": "<string>",
"name": "<string>",
"stackTrace": "<string>"
}
}
],
"schedule": {},
"relatedRuns": {}
}
]
}{
"status": "error",
"error": "<string>"
}{
"status": "error",
"error": "<string>"
}{
"status": "error",
"error": "<string>"
}{
"status": "error",
"error": "Task run not found"
}{
"status": "error",
"error": "<string>"
}Get Task Runs
Returns task runs for the authenticated account. When runId is provided, the response contains that single run (runs length 1) or 404 if not found. When runId is omitted, returns recent runs filtered by account context (default authenticated account, or account_id override when authorized).
curl --request GET \
--url https://api.recoupable.dev/api/tasks/runs \
--header 'x-api-key: <api-key>'import requests
url = "https://api.recoupable.dev/api/tasks/runs"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.recoupable.dev/api/tasks/runs', 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.recoupable.dev/api/tasks/runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-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"
"net/http"
"io"
)
func main() {
url := "https://api.recoupable.dev/api/tasks/runs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.recoupable.dev/api/tasks/runs")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recoupable.dev/api/tasks/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"runs": [
{
"id": "<string>",
"taskIdentifier": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"idempotencyKey": "<string>",
"version": "<string>",
"isTest": true,
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"delayedUntil": "2023-11-07T05:31:56Z",
"ttl": "<unknown>",
"expiredAt": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"metadata": {},
"costInCents": 123,
"baseCostInCents": 123,
"durationMs": 123,
"env": {
"id": "<string>",
"name": "<string>",
"user": "<string>"
},
"depth": 123,
"batchId": "<string>",
"payload": "<unknown>",
"output": {
"videoSourceUrl": "<string>",
"imageUrl": "<string>",
"captionText": "<string>",
"template": "artist-caption-bedroom",
"lipsync": true,
"audio": {
"songTitle": "<string>",
"songFilename": "<string>",
"startSeconds": 123,
"durationSeconds": 123,
"clipLyrics": "<string>",
"clipMood": "<string>"
}
},
"error": {
"message": "<string>",
"name": "<string>",
"stackTrace": "<string>"
},
"attempts": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"error": {
"message": "<string>",
"name": "<string>",
"stackTrace": "<string>"
}
}
],
"schedule": {},
"relatedRuns": {}
}
]
}{
"status": "error",
"error": "<string>"
}{
"status": "error",
"error": "<string>"
}{
"status": "error",
"error": "<string>"
}{
"status": "error",
"error": "Task run not found"
}{
"status": "error",
"error": "<string>"
}Authorizations
Your Recoup API key. Learn more.
Query Parameters
The unique identifier of a specific task run to retrieve. If omitted, returns a list of recent runs for the authenticated account.
Maximum number of runs to return when listing (ignored when runId is provided). Default 20, max 100.
1 <= x <= 100Filter runs by account ID. When provided, returns runs tagged with account:<account_id>. Only applicable when the authenticated account has access to multiple accounts via organization membership.
Response
Task runs retrieved successfully.
Indicates the request was successful
success List of recent task runs for the authenticated account. Each item is a raw Trigger.dev SDK run object (same shape as TaskRunResponse, but without output and error fields).
Show child attributes
Show child attributes
Was this page helpful?
