Skip to main content
Mynth tasks represent asynchronous work. Image generation, content rating, and alt text requests all create tasks. Task types:
  • image.generate
  • image.rate
  • image.alt

Status values

  • pending
  • completed
  • failed

Endpoints

GET /tasks/:id

Returns the full task object. Authentication:
  • requires your Mynth API key
  • owner-only
  • Public Access Tokens do not work here

GET /tasks/:id/status

Returns only:
Authentication:
  • API key, or
  • task-scoped Public Access Token

GET /tasks/:id/result

Returns:
Authentication:
  • API key, or
  • task-scoped Public Access Token

Full task shape

GET /tasks/:id returns the complete task object:
Fields:
  • request contains the original task parameters as submitted.
  • result contains task-specific output. It is null for pending tasks and for failed tasks that did not produce a result.
  • For image.generate, result contains the resolved model, images, and optional magic_prompt.
  • For image.rate, result is { url, level } when completed.
  • For image.alt, result is { url, alt } when completed.
  • result.magic_prompt is present when magic_prompt: true was applied, containing the enhanced positive and optional negative prompt.
  • cost at the task level is the total cost as a decimal string. Per-image cost is returned on each image in result.images[].cost.
  • When size: "auto" is used, the selected dimensions are reflected in each image’s size field ({width}x{height}).
  • errors is present on failed tasks as an array of { code, message? }. See Task error codes.

Result image states

Each image result is either:
  • success
  • failed
A successful image includes id, url (nullable when delivered only to a destination), mynth_url, size ({width}x{height}), and cost (per-image decimal string). A failed image includes error.code. If you want only successful image URLs in the SDK, use task.urls or task.getImages().