{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ai3d-studio/json-schema/ai3d-studio-generation-request-schema.json",
  "title": "GenerationRequest",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ai3d-studio-openapi.json#/components/schemas/GenerationRequest",
  "type": "object",
  "required": [
    "mediaType",
    "model"
  ],
  "additionalProperties": true,
  "properties": {
    "mediaType": {
      "type": "string",
      "description": "Generation family, e.g. 'image' | 'video' | 'music' (see /capabilities for the exact values your app exposes)."
    },
    "model": {
      "type": "string"
    },
    "prompt": {
      "type": "string",
      "description": "The prompt. With `options.preset` it is only your additional instructions (at most 500 characters): the server composes the preset’s own text."
    },
    "options": {
      "type": "object",
      "additionalProperties": true,
      "description": "Model-specific options; derive them from /capabilities (`form` per model: each scene's fields with their kind, value type, limits, options and rules). To run an image preset send mediaType `image`, scene `image-to-image`, `image` (the subject, then an optional reference), `preset` (an id from `generation.presets`), and optionally `preset_addons` (addon ids) and `preset_background` (`plain` or `keep`). A preset adds no cost: it is priced as the model it runs on."
    },
    "scene": {
      "type": "string"
    },
    "workflowType": {
      "type": "string"
    },
    "expectedCredits": {
      "type": "integer",
      "minimum": 0,
      "description": "Generate only: the `credits` POST /quote answered for this body. If the price has moved since, the run is refused with 409 `price_changed` and the new `data.credits`, and nothing is charged."
    }
  }
}