Skip to main content
GET
/
v1
/
commands
/
{command_id}
Get Command Status
curl --request GET \
  --url https://api.rendi.dev/v1/commands/{command_id} \
  --header 'X-API-KEY: <api-key>'
import requests

url = "https://api.rendi.dev/v1/commands/{command_id}"

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.rendi.dev/v1/commands/{command_id}', 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.rendi.dev/v1/commands/{command_id}",
  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.rendi.dev/v1/commands/{command_id}"

	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.rendi.dev/v1/commands/{command_id}")
  .header("X-API-KEY", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.rendi.dev/v1/commands/{command_id}")

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
{
  "command_id": "123e4567-e89b-12d3-a456-426614174000",
  "command_type": "FFMPEG_COMMAND",
  "environment_name": "main",
  "ffmpeg_command_run_seconds": 19.58051347732544,
  "metadata": {
    "key": "value"
  },
  "original_request": {
    "ffmpeg_command": "-i {{in_1}} -ss 00:00 -to 00:30 -filter_complex \"[0:v]split=2[vid1][vid2];[vid1]scale=trunc(oh*a/2)*2:320:force_original_aspect_ratio=decrease,pad=trunc(oh*a/2)*2:320:-1:-1[320p];[vid2]scale=trunc(oh*a/2)*2:180:force_original_aspect_ratio=decrease,pad=trunc(oh*a/2)*2:180:-1:-1[180p]\" -map [320p] -map 0:a -c:a copy -c:v libx264 -preset medium {{out_1}}  -map [180p] -map 0:a -c:a copy -c:v libx264 -preset medium {{out_2}}",
    "input_files": {
      "in_1": "https://storage.rendi.dev/sample/sample.avi"
    },
    "max_command_run_seconds": 300,
    "output_files": {
      "out_1": "output_320p.mp4",
      "out_2": "output_180p.mp4"
    },
    "vcpu_count": 8
  },
  "output_files": {
    "out_1": {
      "bitrate_audio_kb": 242.349609375,
      "bitrate_video_kb": 370.5654296875,
      "codec": "h264",
      "duration": 30,
      "file_format": "mp4",
      "file_id": "f775b15d-67e9-4235-b89f-4bb33c0a5f57",
      "file_type": "video",
      "frame_rate": 24,
      "height": 320,
      "is_varying_frame_rate": false,
      "mime_type": "video/mp4",
      "pixel_format": "yuv420p",
      "size_mbytes": 2.2677812576293945,
      "storage_url": "https://storage.rendi.dev/files/224ea098-5c10-419b-8a77-707d89443c56/42c95292-d953-4b5a-8a58-cf1513363a33/output_320p.mp4",
      "timebase": "1/25",
      "width": 568
    },
    "out_2": {
      "bitrate_audio_kb": 239.9833984375,
      "bitrate_video_kb": 160.955078125,
      "codec": "h264",
      "duration": 596.459,
      "file_format": "mp4",
      "file_id": "9df00eca-3221-49c6-8a64-07850c9a5921",
      "file_type": "video",
      "frame_rate": 24,
      "height": 180,
      "is_varying_frame_rate": false,
      "mime_type": "video/mp4",
      "pixel_format": "yuv420p",
      "size_mbytes": 29.620187759399414,
      "storage_url": "https://storage.rendi.dev/files/224ea098-5c10-419b-8a77-707d89443c56/42c95292-d953-4b5a-8a58-cf1513363a33/output_180p.mp4",
      "timebase": "1/25",
      "width": 320
    }
  },
  "processing_quota_used": 12.5,
  "status": "SUCCESS",
  "total_processing_seconds": 24.955581,
  "vcpu_count": 8
}
{
  "detail": "Invalid authorization key"
}
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Authorizations

X-API-KEY
string
header
required

Path Parameters

command_id
string
required

The UUID of the FFmpeg command to check status for

Query Parameters

presigned_ttl_seconds
integer | null

If set, output files that are private AND already stored return storage_url as a presigned URL valid for this many seconds. For any other file (public, not yet stored, or deleted) the default storage_url is returned unchanged. See the private files guide.

Required range: x <= 604800

Response

Successful Response

Response model for FFmpeg command status.

Contains information about the command execution status, any errors that occurred, output files generated, and the original request details.

command_id
string
required

Unique identifier for the submitted command

Example:

"123e4567-e89b-12d3-a456-426614174000"

environment_name
string | null
required

The environment this command was created in (e.g., 'main', 'test', 'dev').

Example:

"main"

status
enum<string>
required

Current status of the FFmpeg command

Available options:
QUEUED,
PROCESSING,
PREPARED_FFMPEG_COMMAND,
FAILED,
SUCCESS
Example:

"SUCCESS"

command_type
enum<string>
required

Type of command that was run

Available options:
FFMPEG_COMMAND,
FFMPEG_CHAINED_COMMANDS
Examples:

"FFMPEG_COMMAND"

"FFMPEG_CHAINED_COMMANDS"

original_request
Original Request · object
required

The original request that was sent to the server

Example:
{
  "ffmpeg_command": "-i {{in_1}} -ss 00:00 -to 00:30 -filter_complex \"[0:v]split=2[vid1][vid2];[vid1]scale=trunc(oh*a/2)*2:320:force_original_aspect_ratio=decrease,pad=trunc(oh*a/2)*2:320:-1:-1[320p];[vid2]scale=trunc(oh*a/2)*2:180:force_original_aspect_ratio=decrease,pad=trunc(oh*a/2)*2:180:-1:-1[180p]\" -map [320p] -map 0:a -c:a copy -c:v libx264 -preset medium {{out_1}}  -map [180p] -map 0:a -c:a copy -c:v libx264 -preset medium {{out_2}}",
  "input_files": {
    "in_1": "https://storage.rendi.dev/sample/sample.avi"
  },
  "max_command_run_seconds": 300,
  "output_files": {
    "out_1": "output_320p.mp4",
    "out_2": "output_180p.mp4"
  },
  "vcpu_count": 8
}
processing_stage
enum<string> | null

Current processing stage of the command

Available options:
DOWNLOADING,
PREPARING_INPUT_FILES,
FFMPEG_PROCESSING,
UPLOADING
Example:

"DOWNLOADING"

error_status
string | null

Status of any error that occurred during command execution

Example:

"UNREACHABLE_INPUT_FILE"

error_message
string | null

Error details if the command failed

Example:

"Input file url https://rendi.dev/example does not have a valid file name in its' end."

total_processing_seconds
number | null

Processing time, in seconds, since receiving the command, this includes network times, parsing times, and FFMPEG command execution time

ffmpeg_command_run_seconds
number | null

The exact time the specific FFMPEG command took on our servers, in seconds

vcpu_count
integer | null

Number of virtual CPUs used for the command

output_files
Output Files · object | null

Dictionary mapping file aliases to their output file storage, for output folder, the key is 'OUTPUT_FOLDER'

Example:
{
  "out_1": {
    "bitrate_audio_kb": 242.349609375,
    "bitrate_video_kb": 370.5654296875,
    "codec": "h264",
    "duration": 30,
    "file_format": "mp4",
    "file_id": "f775b15d-67e9-4235-b89f-4bb33c0a5f57",
    "file_type": "video",
    "frame_rate": 24,
    "height": 320,
    "is_deleted": false,
    "is_private": false,
    "is_varying_frame_rate": false,
    "mime_type": "video/mp4",
    "pixel_format": "yuv420p",
    "size_mbytes": 2.2677812576293945,
    "storage_url": "https://storage.rendi.dev/files/224ea098-5c10-419b-8a77-707d89443c56/42c95292-d953-4b5a-8a58-cf1513363a33/output_320p.mp4",
    "timebase": "1/25",
    "width": 568
  },
  "out_2": {
    "bitrate_audio_kb": 239.9833984375,
    "bitrate_video_kb": 160.955078125,
    "codec": "h264",
    "duration": 596.459,
    "file_format": "mp4",
    "file_id": "9df00eca-3221-49c6-8a64-07850c9a5921",
    "file_type": "video",
    "frame_rate": 24,
    "height": 180,
    "is_deleted": false,
    "is_private": false,
    "is_varying_frame_rate": false,
    "mime_type": "video/mp4",
    "pixel_format": "yuv420p",
    "size_mbytes": 29.620187759399414,
    "storage_url": "https://storage.rendi.dev/files/224ea098-5c10-419b-8a77-707d89443c56/42c95292-d953-4b5a-8a58-cf1513363a33/output_180p.mp4",
    "timebase": "1/25",
    "width": 320
  }
}
processing_quota_used
number | null

Amount of processing quota used in MB

Required range: x >= 0
Example:

12.5

metadata
Metadata · object | null

Metadata stored with the command, used for custom tracking and reporting

Example:
{ "key": "value" }