### GET /jobs/{job_id} Source: https://www.rendobar.com/docs Retrieve the status and output details of a specific job. ```APIDOC ## GET /jobs/{job_id} ### Description Poll for the status of a job and retrieve output details once complete. ### Method GET ### Endpoint https://api.rendobar.com/jobs/{job_id} ### Parameters #### Path Parameters - **job_id** (string) - Required - The unique identifier of the job. ### Response #### Success Response (200) - **data** (object) - Contains job status and output information. - **id** (string) - The job ID. - **status** (string) - The current status (e.g., "complete"). - **output** (object) - Contains file information if the job is complete. #### Response Example { "data": { "id": "job_abc123", "status": "complete", "output": { "file": { "url": "https://r2.rendobar.com/...", "path": "output.mp4" } } } } ``` -------------------------------- ### Submit an FFmpeg job Source: https://www.rendobar.com/docs Create a new FFmpeg job using the SDK, Python requests, or cURL. Ensure the API key is correctly configured in the headers or client initialization. ```javascript import { createClient, outputUrl } from "@rendobar/sdk"; const client = createClient({ apiKey: "rb_YOUR_KEY" }); const created = await client.jobs.create({ type: "ffmpeg", params: { command: "ffmpeg -i https://example.com/video.mp4 -vf scale=1280:720 -c:v libx264 -preset fast -crf 23 output.mp4", }, }); const job = await client.jobs.wait(created.id); console.log(outputUrl(job)); ``` ```python import requests res = requests.post( "https://api.rendobar.com/jobs", headers={"Authorization": "Bearer rb_YOUR_KEY"}, json={ "type": "ffmpeg", "params": { "command": "ffmpeg -i https://example.com/video.mp4 -vf scale=1280:720 -c:v libx264 -preset fast -crf 23 output.mp4", }, }, ) print(res.json()["data"]["id"]) # job_abc123 ``` ```bash curl -X POST https://api.rendobar.com/jobs \ -H "Authorization: Bearer rb_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "ffmpeg", "params": { "command": "ffmpeg -i https://example.com/video.mp4 -vf scale=1280:720 -c:v libx264 -preset fast -crf 23 output.mp4" } }' ``` -------------------------------- ### POST /jobs Source: https://www.rendobar.com/docs Submit a new FFmpeg job for processing. ```APIDOC ## POST /jobs ### Description Submit a new job to the Rendobar platform for FFmpeg processing. ### Method POST ### Endpoint https://api.rendobar.com/jobs ### Request Body - **type** (string) - Required - The type of job, e.g., "ffmpeg". - **params** (object) - Required - Configuration parameters for the job. - **command** (string) - Required - The full FFmpeg command string. ### Request Example { "type": "ffmpeg", "params": { "command": "ffmpeg -i https://example.com/video.mp4 -vf scale=1280:720 -c:v libx264 -preset fast -crf 23 output.mp4" } } ### Response #### Success Response (200) - **data** (object) - Contains job details. - **id** (string) - The unique identifier for the job. - **status** (string) - The current status of the job (e.g., "waiting"). #### Response Example { "data": { "id": "job_abc123", "status": "waiting" } } ``` -------------------------------- ### Job submission response Source: https://www.rendobar.com/docs The expected JSON response after successfully submitting a job. ```json { "data": { "id": "job_abc123", "status": "waiting" } } ``` -------------------------------- ### Job completion response Source: https://www.rendobar.com/docs The structure of the response when a job reaches the complete status, containing the output file URL. ```json { "data": { "id": "job_abc123", "status": "complete", "output": { "data": null, "file": { "url": "https://r2.rendobar.com/...", "path": "output.mp4", "type": "video", "size": 4194304, "meta": { "format": "mp4", "width": 1280, "height": 720, "durationMs": 30000 } }, "files": [ { "url": "https://r2.rendobar.com/...", "path": "output.mp4", "type": "video", "size": 4194304, "meta": { "format": "mp4", "width": 1280, "height": 720, "durationMs": 30000 } } ], "expiresAt": 1735689600000 }, "cost": { "amount": 50000000, "currency": "USD", "formatted": "$0.05" } } } ``` -------------------------------- ### Poll for job status Source: https://www.rendobar.com/docs Check the current status of a job using its ID. Poll every 1–2 seconds until the status is complete. ```bash curl https://api.rendobar.com/jobs/job_abc123 \ -H "Authorization: Bearer rb_YOUR_KEY" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.