{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azurade-com/json-schema/azurade-com-generation-schema.json",
  "title": "Generation",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azurade-com-openapi.json#/components/schemas/Generation",
  "properties": {
    "cost": {
      "description": "Credits the generation costs: taken when it was accepted, less the share of any images it was asked for and did not deliver, which is refunded",
      "type": "number"
    },
    "created": {
      "format": "date-time",
      "type": "string"
    },
    "error": {
      "description": "Why it failed, when it did",
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "input": {
      "description": "The request body as submitted",
      "type": "object"
    },
    "model": {
      "type": "string"
    },
    "outputs": {
      "items": {
        "$ref": "#/$defs/Output"
      },
      "type": "array"
    },
    "prompt_used": {
      "description": "The prompt the model was given, when translate_prompt or enhance_prompt rewrote the one in input",
      "type": "string"
    },
    "status": {
      "enum": [
        "pending",
        "completed",
        "failed",
        "stalled",
        "canceled"
      ],
      "type": "string"
    },
    "type": {
      "enum": [
        "image",
        "video"
      ],
      "type": "string"
    },
    "updated": {
      "format": "date-time",
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "Output": {
      "properties": {
        "content_type": {
          "type": "string"
        },
        "filename": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "poster_url": {
          "description": "First frame of a video output as JPEG, an unguessable link like url; absent for images",
          "format": "uri",
          "type": "string"
        },
        "url": {
          "description": "Unguessable link that downloads without authentication; anyone holding it can fetch the file",
          "format": "uri",
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}