{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lumeta-ai/json-schema/lumeta-ai-generation-schema.json",
  "title": "Generation",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lumeta-ai-openapi.json#/components/schemas/Generation",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "processing",
        "succeeded",
        "failed"
      ]
    },
    "status_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "While `status` is queued or processing, one plain sentence on what the generation is waiting on, when there is a long wait worth telling the person about (today: Seedance clearing new face photos, which can take several minutes, the photos waiting in line while Seedance's face library is busy, a slow hand-over to Seedance, or the safety check after Seedance did not answer). It changes as the wait moves on, and is null otherwise and once the generation has finished. Show it as it is."
    },
    "model": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "project": {
      "type": [
        "string",
        "null"
      ]
    },
    "input": {
      "type": "object"
    },
    "outputs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "description": "This output's number, counting from 0: what `gen_<id>#<n>` uses. It never shifts, so the list has a gap where the owner deleted an image."
          },
          "type": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "audio",
              "other"
            ]
          },
          "url": {
            "type": "string",
            "description": "Durable https URL of the stored file."
          },
          "mime": {
            "type": [
              "string",
              "null"
            ]
          },
          "width": {
            "type": "integer"
          },
          "height": {
            "type": "integer"
          },
          "duration": {
            "type": "number",
            "description": "Seconds, for audio and video."
          },
          "size": {
            "type": "integer",
            "description": "Bytes."
          }
        }
      }
    },
    "text": {
      "type": [
        "string",
        "null"
      ],
      "description": "The words of a model that answers in text rather than a file, such as Speech-to-Text's transcript (its `outputs` is empty); null otherwise."
    },
    "credits_charged": {
      "type": "integer",
      "description": "What was charged; a refunded failure reads 0."
    },
    "error": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "code": {
          "type": "string",
          "description": "canceled when you canceled it; otherwise the error codes above."
        },
        "message": {
          "type": "string",
          "description": "Plain text, written for the person who made the generation."
        }
      }
    },
    "origin": {
      "type": "string",
      "enum": [
        "web",
        "api",
        "mcp",
        "cli"
      ]
    },
    "request_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string"
    },
    "completed_in_seconds": {
      "type": [
        "number",
        "null"
      ]
    },
    "finalize_1080p": {
      "type": "object",
      "description": "Present only while this generation can still be re-made at 1080p with POST /v1/generations/{id}/finalize (Seedance 2.5 480p, not Flash, for 7 days). The 1080p run is the same video rather than an upscale, and costs what generating it at 1080p would have cost in the first place, so making a 480p one first and then this is about 19% more than going straight to 1080p, and nothing at all when the draft is not worth finishing.",
      "properties": {
        "credits": {
          "type": "integer",
          "description": "What the 1080p version will cost."
        },
        "expires_at": {
          "type": "string",
          "description": "ISO 8601, UTC. After this the 480p generation can no longer be re-made."
        }
      }
    },
    "credits_remaining": {
      "type": "integer",
      "description": "On POST /v1/generations only. When the team paid (`team`), what you may still spend from that team: the smaller of your monthly limit left there and the team's credits."
    },
    "team": {
      "type": "string",
      "description": "On POST /v1/generations only, when the generation was made in a team project: `team_<id>`, the team that paid."
    },
    "cap_remaining": {
      "type": [
        "integer",
        "null"
      ]
    },
    "user_defaults_applied": {
      "type": "object",
      "description": "Present only on a request from the Lumeta CLI or the MCP server, and only when the account had saved its own defaults for this model on the website (the tool's \"default settings\" sheet) and this request left those inputs out. Each entry is an input name and the value used. Send the input yourself to override it for one run."
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Present only when there is something to say about this request that did not stop it, each a plain sentence for the person: an `@word` in the prompt that is no Shelf name (sent as text), an input you sent that the other inputs switch off (ignored, with the condition it needs), or a change to the model that affects this request, such as a new default or price, with what to send to keep the old behavior. Change notices run for a set time after the change; the input schema lists the running ones as `x-lumeta-notices`."
    }
  }
}