Octen · Schema

ImageGenerationStreamEvent

A streaming SSE event. Partial preview images arrive first (each with `partial_image_index`), then one `completed` event with `usage`. The event type prefix is `image_generation` for text-to-image and `image_edit` for editing.

SearchWeb SearchArtificial IntelligenceLLMEmbeddingsContent ExtractionModel GatewayMCPAgentsDeep ResearchCompany

Properties

Name Type Description
id string Request identifier. Identical across all events of one request.
type string The event type.
b64_json string Base64 image for this event: the current preview for `partial_image`, the final image for `completed`.
created_at integer Unix timestamp when the event was generated.
size string (GPT only) The output size actually applied; useful when `size` was `auto`.
quality string (GPT only) The quality tier actually applied.
background string (GPT only) The background setting actually applied.
output_format string The output format actually applied; for Gemini, derived from the mimeType.
partial_image_index integer Present only in `partial_image` events. Preview index, starting at 0.
usage object Present only in `completed` events. Same structure as the non-streaming `usage`.
View JSON Schema on GitHub

JSON Schema

octen-ai-image-generation-stream-event-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/octen-ai/json-schema/octen-ai-image-generation-stream-event-schema.json",
  "title": "ImageGenerationStreamEvent",
  "description": "A streaming SSE event. Partial preview images arrive first (each with `partial_image_index`), then one `completed` event with `usage`. The event type prefix is `image_generation` for text-to-image and `image_edit` for editing.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/octen-ai-images-api-openapi.yml#/components/schemas/ImageGenerationStreamEvent",
  "type": "object",
  "required": [
    "id",
    "type",
    "b64_json"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Request identifier. Identical across all events of one request."
    },
    "type": {
      "type": "string",
      "enum": [
        "image_generation.partial_image",
        "image_generation.completed",
        "image_edit.partial_image",
        "image_edit.completed"
      ],
      "description": "The event type."
    },
    "b64_json": {
      "type": "string",
      "description": "Base64 image for this event: the current preview for `partial_image`, the final image for `completed`."
    },
    "created_at": {
      "type": "integer",
      "description": "Unix timestamp when the event was generated."
    },
    "size": {
      "type": "string",
      "description": "(GPT only) The output size actually applied; useful when `size` was `auto`."
    },
    "quality": {
      "type": "string",
      "enum": [
        "low",
        "medium",
        "high",
        "xhigh",
        "max"
      ],
      "description": "(GPT only) The quality tier actually applied."
    },
    "background": {
      "type": "string",
      "enum": [
        "transparent",
        "opaque"
      ],
      "description": "(GPT only) The background setting actually applied."
    },
    "output_format": {
      "type": "string",
      "enum": [
        "png",
        "jpeg",
        "webp"
      ],
      "description": "The output format actually applied; for Gemini, derived from the mimeType."
    },
    "partial_image_index": {
      "type": "integer",
      "description": "Present only in `partial_image` events. Preview index, starting at 0."
    },
    "usage": {
      "allOf": [
        {
          "$ref": "#/$defs/ImageUsage"
        }
      ],
      "description": "Present only in `completed` events. Same structure as the non-streaming `usage`."
    }
  },
  "$defs": {
    "ImageUsage": {
      "type": "object",
      "required": [
        "input_tokens",
        "output_tokens",
        "total_tokens"
      ],
      "description": "Token usage information.",
      "properties": {
        "input_tokens": {
          "type": "integer",
          "description": "Input tokens (text prompt + input image tokens)."
        },
        "input_tokens_details": {
          "type": "object",
          "properties": {
            "text_tokens": {
              "type": "integer",
              "description": "Text tokens of the prompt."
            },
            "image_tokens": {
              "type": "integer",
              "description": "Tokens of the input images."
            }
          }
        },
        "output_tokens": {
          "type": "integer",
          "description": "Output tokens (generated image tokens + reasoning text tokens)."
        },
        "output_tokens_details": {
          "type": "object",
          "properties": {
            "text_tokens": {
              "type": "integer",
              "description": "Output tokens used by reasoning text."
            },
            "image_tokens": {
              "type": "integer",
              "description": "Tokens of the generated images."
            }
          }
        },
        "total_tokens": {
          "type": "integer",
          "description": "Total tokens (input_tokens + output_tokens)."
        }
      }
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/octen-ai-image-generation-stream-event"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.