cURL
curl --request GET \
--url https://api.recoupable.dev/api/tasks \
--header 'x-api-key: <api-key>'import requests
url = "https://api.recoupable.dev/api/tasks"
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', 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",
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"
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")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recoupable.dev/api/tasks")
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{
"tasks": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"prompt": "<string>",
"schedule": "<string>",
"timezone": "America/New_York",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"artist_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enabled": true,
"trigger_schedule_id": "<string>",
"recent_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": {}
}
],
"upcoming": [
"2023-11-07T05:31:56Z"
],
"owner_email": "<string>",
"model": "<string>"
}
],
"error": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Tasks
Get Tasks
Retrieve scheduled tasks. Each task includes recent_runs (last 5 runs), upcoming (next scheduled run times) sourced directly from the Trigger.dev API, and owner_email when an account email exists for the task owner. Supports filtering by id, account_id, or artist_account_id.
GET
/
api
/
tasks
cURL
curl --request GET \
--url https://api.recoupable.dev/api/tasks \
--header 'x-api-key: <api-key>'import requests
url = "https://api.recoupable.dev/api/tasks"
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', 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",
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"
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")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recoupable.dev/api/tasks")
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{
"tasks": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"prompt": "<string>",
"schedule": "<string>",
"timezone": "America/New_York",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"artist_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enabled": true,
"trigger_schedule_id": "<string>",
"recent_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": {}
}
],
"upcoming": [
"2023-11-07T05:31:56Z"
],
"owner_email": "<string>",
"model": "<string>"
}
],
"error": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Authorizations
apiKeyAuthbearerAuth
Your Recoup API key. Learn more.
Query Parameters
Filter by task ID (UUID). Returns a single task matching the provided ID. Admin callers may retrieve any task by ID regardless of owner; non-admin callers only receive the task if it belongs to their authenticated account.
Filter tasks to only include those for the specified account.
Filter tasks to only include those for the specified artist account.
Was this page helpful?
⌘I
