{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bike4mind-com/json-schema/bike4mind-com-generate-image-request-schema.json",
  "title": "generateImageRequest",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bike4mind-com-openapi.json#/components/schemas/generateImageRequest",
  "type": "object",
  "properties": {
    "prompt": {
      "type": "string"
    },
    "model": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "gpt-image-1",
            "gpt-image-1.5",
            "gpt-image-1-mini",
            "gpt-image-2",
            "gpt-image-2.5-sunburst",
            "gpt-image-2.5-flare",
            "flux-pro-1.1",
            "flux-pro",
            "flux-pro-1.1-ultra",
            "flux-pro-1.0-fill",
            "flux-kontext-pro",
            "flux-kontext-max",
            "flux-2-max",
            "flux-2-pro",
            "flux-2-pro-preview",
            "flux-2-flex",
            "flux-2-klein-9b",
            "flux-2-klein-9b-preview",
            "flux-2-klein-4b",
            "grok-imagine-image-quality",
            "gemini-2.5-flash-image",
            "gemini-3-pro-image-preview",
            "gemini-3-pro-image",
            "gemini-3.1-flash-image"
          ]
        },
        {
          "type": "string",
          "maxLength": 256,
          "pattern": "^local-image\\/(?=.*\\S)[\\w.:/ -]+$"
        }
      ]
    },
    "n": {
      "type": "number",
      "minimum": 1,
      "maximum": 10
    },
    "quality": {
      "type": "string",
      "enum": [
        "standard",
        "hd",
        "low",
        "medium",
        "high",
        "xhigh",
        "max",
        "auto"
      ]
    },
    "response_format": {
      "type": "string",
      "enum": [
        "b64_json",
        "url"
      ]
    },
    "size": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "1024x1024",
            "1024x1536",
            "1536x1024",
            "2048x2048",
            "2048x1152",
            "3840x2160",
            "2160x3840",
            "auto",
            "1024x768"
          ]
        },
        {
          "type": "string",
          "pattern": "^\\d+x\\d+$"
        },
        {
          "type": "null"
        }
      ]
    },
    "style": {
      "type": "string",
      "enum": [
        "vivid",
        "natural"
      ]
    },
    "background": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "transparent",
        "opaque",
        "auto",
        null
      ]
    },
    "width": {
      "type": "number"
    },
    "height": {
      "type": "number"
    },
    "aspect_ratio": {
      "type": "string"
    },
    "sessionId": {
      "type": "string"
    },
    "questId": {
      "type": "string"
    },
    "organizationId": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 1,
      "description": "The organization to bill: one you belong to, or null for your personal credits. Omitted bills your home organization, or your personal credits if you have none. An organization-billed API key always bills its own organization: omit this or set it to the key's organization; any other value, null included, is rejected with a 403 (`errorCode: billing_organization_mismatch`)."
    },
    "fabFileIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "default": []
    },
    "referenceImageFabFileIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "maxItems": 15
    },
    "tools": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "string",
            "enum": [
              "dice_roll",
              "image_generation",
              "edit_image",
              "music_generation",
              "audio_generation",
              "video_generation",
              "weather_info",
              "web_search",
              "web_fetch",
              "wolfram_alpha",
              "math_evaluate",
              "mermaid_chart",
              "current_datetime",
              "current_model_details",
              "deep_research",
              "prompt_enhancement",
              "recharts",
              "edit_file",
              "blog_publish",
              "blog_edit",
              "blog_draft",
              "wikipedia_on_this_day",
              "moon_phase",
              "sunrise_sunset",
              "iss_tracker",
              "planet_visibility",
              "search_knowledge_base",
              "chess_engine",
              "retrieve_knowledge_content",
              "count_knowledge_base",
              "describe_knowledge_base",
              "decide",
              "list_my_data_lakes",
              "create_data_lake",
              "save_content_to_data_lake",
              "delegate_to_agent",
              "optihashi_schedule",
              "optihashi_formulate",
              "optihashi_edit_problem",
              "navigate_view",
              "generate_jupyter_notebook",
              "excel_generation",
              "fmp_financial_data",
              "bob_panel_read",
              "skill"
            ]
          },
          {
            "type": "string"
          }
        ]
      }
    },
    "safety_tolerance": {
      "type": "number",
      "minimum": 0,
      "maximum": 6,
      "default": 2
    },
    "prompt_upsampling": {
      "type": "boolean",
      "default": false,
      "description": "Let the provider rewrite and expand the prompt before rendering. Applies to Black Forest Labs (FLUX) models only; other models ignore it. Defaults to false."
    },
    "seed": {
      "type": [
        "number",
        "null"
      ]
    },
    "output_format": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "png",
        "jpeg",
        "webp",
        null
      ]
    },
    "sessionName": {
      "type": "string"
    },
    "organization_id": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 1,
      "description": "Alias of `organizationId`, for callers used to the snake_case video and music bodies. Sending both with different values is a 422."
    },
    "callbackUrl": {
      "type": "string",
      "maxLength": 2048,
      "format": "uri",
      "description": "Optional https URL that receives one signed POST when the job settles (success or failure). Requires API-key authentication and a callback signing secret on that key. The body is the GET /api/v1/quests/{id} response. Verify it with the `X-Webhook-Signature-256` header: `sha256=` + hex HMAC-SHA256 of `<X-Webhook-Timestamp>.<raw body>` keyed with the signing secret. Polling keeps working either way."
    },
    "projectId": {
      "type": "string"
    },
    "prompt_resolution": {
      "type": "string",
      "enum": [
        "auto",
        "literal"
      ],
      "description": "How the prompt is treated before it reaches the image model. `\"auto\"` (the default) resolves it against the session history, so a follow-up such as \"make it darker\" is rewritten to carry the previous subject and the prior image is fed back as input. `\"literal\"` skips that step: the prompt is sent unchanged (apart from truncation to the model's prompt limit), `intent` is `\"fresh\"`, `promptWasEnhanced` is `false`, and a prior session image is carried forward only for models that cannot run without an input image. Use `\"literal\"` when the prompt is already self-contained, for example when an agent or pipeline builds it."
    }
  },
  "required": [
    "prompt",
    "model"
  ]
}