Jobs and results

Every edit request creates a job. It starts as processing and ends as completed (at least one output succeeded), failed (none did) or canceled. Each image of the job is an output with its own status.

The job object

FieldDescription
idstringThe job id, job_ plus 20 characters.
objectstringAlways "job".
toolstringThe endpoint that made it: generate, remove-background, background, color, pose, model-swap, ghost-mannequin or upscale.
statusstring"processing", then "completed" (at least one output succeeded), "failed" or "canceled".
livemodebooleanfalse for jobs made with a test key.
outputsarrayOne entry per image: id (out_1, out_2 …), status ("processing", "succeeded", "failed"), label, url and url_expires_at when succeeded, error {code, message} when failed.
credits_chargedintegerCredits taken when the job was created (0 for a test key).
credits_refundedintegerCredits given back for outputs that failed or were canceled.
metadataobjectYour metadata, or null.
created_atstringISO 8601, UTC.
completed_atstringISO 8601, UTC; null while processing.

Output errors

A failed output has error.code, and its credit is refunded:

content_refusedThe model refused this image under its content rules.
generation_failedThe image could not be made.
timeoutThe image took too long and was stopped.
canceledThe job was canceled before this image was made.

Get a job

GET/jobs/{id}

Returns the job. Poll every 3 to 5 seconds while it is processing; status reads have their own, higher rate limit. Output links are signed and valid about 24 hours; each call returns a current one.

curl https://api.garmo.studio/v1/jobs/job_8Kq2xV7mPz4LtR9wNc3B \
  -H "Authorization: Bearer $GARMO_API_KEY"

List jobs

GET/jobs

Jobs of this account made with keys of the same mode (live or test), newest first.

ParameterDescription
limitintegerBetween 1 and 100. Default 20.
starting_afterstringA job id: list the jobs after it.
statusstringprocessing, completed, failed or canceled.
curl https://api.garmo.studio/v1/jobs?limit=20&status=completed \
  -H "Authorization: Bearer $GARMO_API_KEY"
Response
{
  "object": "list",
  "data": [
    "…jobs…"
  ],
  "has_more": true
}

Cancel a job

POST/jobs/{id}/cancel

Stops the outputs still rendering and refunds their credits; outputs already finished are kept. A finished job is returned unchanged.

curl -X POST https://api.garmo.studio/v1/jobs/job_8Kq2xV7mPz4LtR9wNc3B/cancel \
  -H "Authorization: Bearer $GARMO_API_KEY"