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
{
"object": "job",
"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",
"webhook_delivered": true
}
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) { while (true) { const response = await fetch(`https://armox.ai/api/v1/jobs/${jobId}`, { headers: { Authorization: `Bearer ${apiKey}` }, }); const job = await response.json(); if (["completed", "failed", "cancelled"].includes(job.status)) { return job; } await new Promise((resolve) => setTimeout(resolve, 2000)); } }
Python
Prompt Template
import time import requests def wait_for_job(job_id, api_key): while True: response = requests.get( f"https://armox.ai/api/v1/jobs/{job_id}", headers={"Authorization": f"Bearer {api_key}"} ) job = response.json() if job.get("status") in ["completed", "failed", "cancelled"]: return job time.sleep(2)
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