Generations

3 actions. Each is callable by the agent as a tool, over HTTP via /api/invoke, and (usually) from a UI page.

generations.enqueue

POST · mutating

Enqueue an async media generation job (image/video/audio/music). Returns a job to poll with generations.get.

  • AI tool: generations_enqueue
  • API: POST /api/invoke/generations.enqueue

Input

Field Type Required Description
modality "image" | "video" | "audio" | "music" yes
prompt string yes
size string
aspectRatio string
n integer
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "modality": {
      "type": "string",
      "enum": [
        "image",
        "video",
        "audio",
        "music"
      ]
    },
    "prompt": {
      "type": "string",
      "minLength": 1
    },
    "size": {
      "type": "string"
    },
    "aspectRatio": {
      "type": "string"
    },
    "n": {
      "type": "integer",
      "minimum": 1,
      "maximum": 4
    }
  },
  "required": [
    "modality",
    "prompt"
  ]
}

generations.get

GET

Poll one generation job by id for status + result.

  • AI tool: generations_get
  • API: GET /api/invoke/generations.get

Input

Field Type Required Description
id string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "id"
  ]
}

generations.list

GET

List recent generation jobs (newest first), optionally filtered by modality.

  • AI tool: generations_list
  • API: GET /api/invoke/generations.list

Input

Field Type Required Description
modality "image" | "video" | "audio" | "music"
limit integer
offset integer
orderBy string
orderDir "asc" | "desc"
q string
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "modality": {
      "type": "string",
      "enum": [
        "image",
        "video",
        "audio",
        "music"
      ]
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "orderBy": {
      "type": "string"
    },
    "orderDir": {
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "q": {
      "type": "string"
    }
  }
}