{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aiand-com/json-schema/aiand-com-video-job-object-schema.json",
  "title": "VideoJobObject",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aiand-com-openapi.json#/components/schemas/VideoJobObject",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable job id with `video_` prefix"
    },
    "object": {
      "type": "string",
      "const": "video"
    },
    "model": {
      "type": "string"
    },
    "prompt": {
      "type": "string"
    },
    "seconds": {
      "type": "integer"
    },
    "status": {
      "type": "string",
      "enum": [
        "moderating",
        "translating",
        "queued",
        "in_progress",
        "completed",
        "failed",
        "canceled"
      ],
      "description": "Jobs start as `moderating` while input moderation runs, then progress through `translating` (prompt translation), `queued`, and `in_progress`. Treat any unrecognized status as still running — new intermediate stages may be added."
    },
    "error": {
      "oneOf": [
        {
          "$ref": "#/$defs/VideoJobError"
        },
        {
          "type": "null"
        }
      ],
      "description": "Populated only when status is `failed`. Code `moderation_blocked` means the input was refused by content moderation; `moderation_unavailable` means the moderation system was down; `translation_unavailable` means a Japanese prompt could not be translated. Unavailable jobs fail closed — resubmit later."
    },
    "cost": {
      "type": [
        "string",
        "null"
      ],
      "description": "Exact quoted charge as a decimal string, fixed when the job is accepted"
    },
    "currency": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "usd",
        "jpy",
        null
      ],
      "description": "Currency of the quoted `cost`"
    },
    "created_at": {
      "type": "integer",
      "description": "Unix timestamp"
    },
    "completed_at": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Unix timestamp"
    },
    "thumbnail": {
      "type": "boolean",
      "description": "`true` when the job has a thumbnail to download from `GET /v1/videos/{video_id}/thumbnail`"
    }
  },
  "required": [
    "id",
    "object",
    "model",
    "prompt",
    "seconds",
    "status",
    "error",
    "cost",
    "currency",
    "created_at",
    "completed_at",
    "thumbnail"
  ],
  "$defs": {
    "VideoJobError": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ]
    }
  }
}