Jobs Endpoint
Every model/app run creates a job object.
Use Jobs endpoints to:
- list recent jobs
- fetch one job by ID
- cancel cancellable jobs
Base paths:
GET /api/v1/jobsGET /api/v1/jobs/:idPOST /api/v1/jobs/:id/cancel
Job Lifecycle
Jobs use these statuses:
pendingprocessingcompletedfailedcancelled
flowchart LR
pending --> processing
processing --> completed
processing --> failed
pending --> cancelled
processing --> cancelled
Terminal statuses are:
completedfailedcancelled
GET /api/v1/jobs
Lists recent jobs for the authenticated user.
Query Parameters
limit(optional): 1-100, default20
Request
curl -X GET "https://armox.ai/api/v1/jobs?limit=20" \
-H "Authorization: Bearer sk_live_your_key_here"
Response
Prompt Template
{ "object": "list", "data": [ { "id": "job_123", "run_type": "model", "model_id": "google/nano-banana", "app_id": null, "status": "completed", "input_data": { "input": { "prompt": "..." } }, "output_data": { "outputImage": "https://..." }, "error_message": null, "credits_charged": 70, "created_at": "2026-03-26T12:30:00.000Z", "completed_at": "2026-03-26T12:30:03.000Z" } ] }
GET /api/v1/jobs/:id
Returns one specific job.
Request
curl -X GET "https://armox.ai/api/v1/jobs/job_123" \
-H "Authorization: Bearer sk_live_your_key_here"
Response
Prompt Template
{ "object": "job", "id": "0fefb57b-a89a-46f3-b7f6-da24841722f4", "run_type": "app", "model_id": null, "app_id": "cb2bbd2d-b538-4d34-a54e-a9158c2e0dbb", "status": "completed", "input_data": { "app_id": "cb2bbd2d-b538-4d34-a54e-a9158c2e0dbb", "inputs": { "93197f6b-0180-4da1-ad4a-87890d2c7d4a": [ "https://example.com/reference-image.jpg" ], "ced4aa7b-a2a8-4b53-b9ea-1b3e7d9194b5": "auto" } }, "output_data": { "app_id": "cb2bbd2d-b538-4d34-a54e-a9158c2e0dbb", "app_name": "Sketch to Render", "node_outputs": { "6fa95504-bf6c-44e6-bdda-c418903abc8c": { "outputImage": "https://armox-storage.s3.us-west-2.amazonaws.com/public/canvas-images/transform-this-architectural-h-2aebaf05-2c74-4b02-be78-979885f22aef.jpeg" } } }, "error_message": null, "credits_charged": 200, "created_at": "2026-04-06T11:15:14.964978+00:00", "completed_at": "2026-04-06T11:17:14.985+00:00", "webhook_delivered": false }
For app jobs:
model_idis usuallynulloutput_data.node_outputsis keyed by internal node IDs- each node output may expose
outputImage,outputVideo,outputAudio, or other model-specific fields
POST /api/v1/jobs/:id/cancel
Attempts to cancel a pending or processing job.
Request
curl -X POST "https://armox.ai/api/v1/jobs/job_123/cancel" \
-H "Authorization: Bearer sk_live_your_key_here"
Success Response
{
"id": "job_123",
"object": "job",
"status": "cancelled",
"cancelled_at": "2026-03-26T12:35:00.000Z"
}
If the job can no longer be cancelled, API may return 409.
Polling Pattern
JavaScript
Prompt Template
async function waitForJob(jobId, apiKey) { const timeoutAt = Date.now() + 10 * 60 * 1000; // 10 min while (true) { const response = await fetch(`https://armox.ai/api/v1/jobs/${jobId}`, { headers: { Authorization: `Bearer ${apiKey}` }, }); if (response.status === 429) { const retryAfter = Number(response.headers.get("Retry-After") || 60); await new Promise((resolve) => setTimeout(resolve, retryAfter * 1000)); continue; } const job = await response.json(); if (["completed", "failed", "cancelled"].includes(job.status)) { return job; } if (Date.now() > timeoutAt) throw new Error("Timed out waiting for job"); // 10-15s polling avoids rate-limit issues on low-RPM API keys. await new Promise((resolve) => setTimeout(resolve, 10000)); } }
Python
Prompt Template
import time import requests def wait_for_job(job_id, api_key): timeout_at = time.time() + 600 # 10 min while True: response = requests.get( f"https://armox.ai/api/v1/jobs/{job_id}", headers={"Authorization": f"Bearer {api_key}"} ) if response.status_code == 429: retry_after = int(response.headers.get("Retry-After", "60")) time.sleep(retry_after) continue job = response.json() if job.get("status") in ["completed", "failed", "cancelled"]: return job if time.time() > timeout_at: raise TimeoutError("Timed out waiting for job") time.sleep(10)
Credits and Failures
- credits are charged when a run is accepted
- failed jobs are refunded by the job executor flow
- cancelled jobs follow the platform's cancellation and credit logic