Docs/API/Jobs

Jobs API

Create, monitor, and manage AI inference jobs.

Endpoints

POST/v1/models/{model}/runRun a model
GET/v1/jobs/{id}Get job status
GET/v1/jobs/{id}/resultGet job result
DELETE/v1/jobs/{id}Cancel a job

Run a Model

Execute inference on a model. By default, this endpoint waits for the result (sync mode). For long-running jobs, use async mode with webhooks.

POST/v1/models/{model}/run

Request Body

ParameterTypeRequiredDescription
inputobjectYesModel-specific input parameters
webhook_urlstringNoURL to receive completion webhook
asyncbooleanNoReturn immediately without waiting

Example Request

curl -X POST https://api.abstrakt.one/v1/models/fal-ai/flux/schnell/run \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "prompt": "A beautiful sunset over mountains",
      "image_size": "square_hd",
      "num_images": 1
    }
  }'

Response

{
  "request_id": "req_abc123xyz",
  "status": "completed",
  "output": {
    "items": [
      {
        "type": "image",
        "url": "https://cdn.abstrakt.one/outputs/abc123.png",
        "width": 1024,
        "height": 1024,
        "content_type": "image/png"
      }
    ]
  },
  "metrics": {
    "inference_time": 1.823,
    "queue_time": 0.045
  },
  "created_at": "2026-01-11T10:30:00Z",
  "completed_at": "2026-01-11T10:30:02Z"
}

Get Job Status

Retrieve the current status of a job. Useful for polling async jobs.

GET/v1/jobs/{id}

Path Parameters

ParameterDescription
idThe job ID (request_id from run response)

Example

curl https://api.abstrakt.one/v1/jobs/req_abc123xyz \
  -H "Authorization: Bearer YOUR_API_KEY"

Job Statuses

StatusDescription
pendingJob is queued and waiting to be processed
processingJob is currently being processed
completedJob finished successfully
failedJob failed with an error
cancelledJob was cancelled by the user

Cancel a Job

Cancel a pending or processing job. Credits are not charged for cancelled jobs.

DELETE/v1/jobs/{id}

Example

curl -X DELETE https://api.abstrakt.one/v1/jobs/req_abc123xyz \
  -H "Authorization: Bearer YOUR_API_KEY"

Async Mode

For long-running jobs (like video generation), use async mode to avoid timeouts:

curl -X POST https://api.abstrakt.one/v1/models/fal-ai/minimax/video-01/run \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "prompt": "A timelapse of clouds moving over a city"
    },
    "async": true,
    "webhook_url": "https://your-server.com/webhooks/abstrakt"
  }'

The response will include the job ID immediately. Poll the status endpoint or wait for the webhook to receive the result.

Tip: Use webhooks instead of polling for better efficiency. See the Webhooks documentation for setup instructions.