Skip to main content
Mynth tasks represent asynchronous work. Every image generation request creates one task.

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:
{ "status": "pending" }
Authentication:
  • API key, or
  • task-scoped Public Access Token

GET /tasks/:id/results

Returns:
{
  "images": [
    {
      "status": "succeeded",
      "id": "img_123",
      "url": "https://...",
      "cost": "0.01250000",
      "size": "1024x1024"
    }
  ]
}
Authentication:
  • API key, or
  • task-scoped Public Access Token

Full task shape

GET /tasks/:id returns the complete task object:
{
  "id": "tsk_01KE7XWWEQ4MCGWKBQKJ1G47RP",
  "status": "completed",
  "type": "image.generate",
  "createdAt": "2025-01-15T10:30:00.000Z",
  "updatedAt": "2025-01-15T10:30:12.000Z",
  "request": {
    "prompt": "Editorial product photo of a ceramic mug",
    "model": "google/gemini-3.1-flash-image",
    "size": "landscape",
    "count": 1
  },
  "result": {
    "model": "google/gemini-3.1-flash-image",
    "images": [
      {
        "status": "succeeded",
        "id": "img_123",
        "url": "https://...",
        "cost": "0.01250000",
        "size": "1536x1024"
      }
    ],
    "cost": {
      "images": "0.01000000",
      "total": "0.01250000"
    }
  }
}
Fields:
  • request contains the original generation parameters as submitted.
  • result contains the resolved model, image results, and cost breakdown. This field is absent for pending tasks and failed tasks that did not reach generation.
  • result.cost.magic_prompt is optional metadata reserved for prompt-enhancement pricing details in alpha responses.
  • result.prompt_enhance is present when prompt enhancement was applied.
  • result.size_auto is present when size: "auto" was used and Mynth selected a size.

Result image states

Each image result is either:
  • succeeded
  • failed
If you want only successful image URLs in the SDK, use task.urls or task.getImages().