{
 "components": {
  "schemas": {
   "Attempt": {
    "properties": {
     "cost_unmeasured": {
      "description": "No run time was reported, so the cost is the hold.",
      "type": "boolean"
     },
     "error": {
      "type": "string"
     },
     "model": {
      "type": "string"
     },
     "provider": {
      "type": "string"
     },
     "status": {
      "type": "string"
     }
    },
    "type": "object"
   },
   "Cost": {
    "properties": {
     "amount": {
      "description": "Dollars: the router's estimate of what API.market bills.",
      "type": "number"
     },
     "amount_is_estimate": {
      "description": "Always true; the API.market usage log has the billed amount.",
      "type": "boolean"
     },
     "currency": {
      "enum": [
       "USD"
      ],
      "type": "string"
     },
     "estimated": {
      "description": "Dollars held for the job.",
      "type": "number"
     },
     "final": {
      "type": "boolean"
     }
    },
    "type": "object"
   },
   "DryRun": {
    "properties": {
     "estimated_cost": {
      "description": "Dollars on the route tried first; null when it is priced by an input's length.",
      "type": "number"
     },
     "explanation": {
      "type": "string"
     },
     "hold": {
      "description": "Dollars a real request would hold.",
      "type": "number"
     },
     "model": {
      "type": "string"
     },
     "object": {
      "enum": [
       "dry_run"
      ],
      "type": "string"
     },
     "provider": {
      "type": "string"
     },
     "resolved_request": {
      "$ref": "#/components/schemas/ImageRequest"
     }
    },
    "type": "object"
   },
   "ImageRequest": {
    "additionalProperties": false,
    "description": "The body of every create endpoint, a superset of OpenRouter's /api/v1/images.",
    "properties": {
     "aspect_ratio": {
      "type": "string"
     },
     "background": {
      "type": "string"
     },
     "callback_url": {
      "description": "Not supported yet; poll GET /v1/jobs/{id}.",
      "type": "string"
     },
     "dry_run": {
      "default": false,
      "description": "Resolve and price the request with no hold and no job.",
      "type": "boolean"
     },
     "input_references": {
      "description": "Input media.",
      "items": {
       "$ref": "#/components/schemas/InputReference"
      },
      "type": "array"
     },
     "metadata": {
      "additionalProperties": {
       "type": "string"
      },
      "description": "Up to 16 string values, returned on the job.",
      "type": "object"
     },
     "model": {
      "description": "A model id from GET /v1/models, or auto. The X-Model header is read when this is unset.",
      "type": "string"
     },
     "models": {
      "description": "Fallback models doing the same task.",
      "items": {
       "type": "string"
      },
      "type": "array"
     },
     "n": {
      "description": "Outputs wanted, up to the model's max_n.",
      "minimum": 1,
      "type": "integer"
     },
     "output_format": {
      "type": "string"
     },
     "parameters": {
      "description": "The model's own parameters, from its supported_parameters.",
      "type": "object"
     },
     "priority": {
      "default": "balanced",
      "description": "How models are ranked: cost (estimate), speed (measured median), quality (your order), balanced (cheapest within twice the fastest median).",
      "enum": [
       "cost",
       "speed",
       "quality",
       "balanced"
      ],
      "type": "string"
     },
     "prompt": {
      "description": "The prompt, for models that take one.",
      "type": "string"
     },
     "provider": {
      "$ref": "#/components/schemas/ProviderPrefs"
     },
     "quality": {
      "type": "string"
     },
     "resolution": {
      "type": "string"
     },
     "response_format": {
      "description": "Only url is supported.",
      "enum": [
       "url"
      ],
      "type": "string"
     },
     "seed": {
      "type": "integer"
     },
     "size": {
      "type": "string"
     },
     "use_case": {
      "description": "What the job is for. With model auto, or no model, API.market picks the model.",
      "maxLength": 2000,
      "type": "string"
     }
    },
    "type": "object"
   },
   "ImagesResponse": {
    "description": "A finished image job, OpenAI shaped.",
    "properties": {
     "completed": {
      "type": "integer"
     },
     "created": {
      "type": "integer"
     },
     "data": {
      "items": {
       "properties": {
        "b64_json": {
         "type": "string"
        },
        "media_type": {
         "type": "string"
        },
        "url": {
         "type": "string"
        }
       },
       "type": "object"
      },
      "type": "array"
     },
     "id": {
      "type": "string"
     },
     "model": {
      "type": "string"
     },
     "provider": {
      "type": "string"
     },
     "resolved_request": {
      "$ref": "#/components/schemas/ImageRequest"
     },
     "routing": {
      "$ref": "#/components/schemas/Routing"
     },
     "usage": {
      "$ref": "#/components/schemas/Usage"
     }
    },
    "type": "object"
   },
   "InputReference": {
    "additionalProperties": false,
    "properties": {
     "image_url": {
      "description": "The input: an HTTPS URL, a data URI of up to 1 MB, or a file ID. Also accepted as video_url or audio_url.",
      "properties": {
       "url": {
        "type": "string"
       }
      },
      "required": [
       "url"
      ],
      "type": "object"
     },
     "role": {
      "description": "Its role for the model; unlabelled inputs are image first, then reference.",
      "enum": [
       "image",
       "reference",
       "mask",
       "face",
       "garment",
       "first_frame",
       "last_frame",
       "video",
       "audio"
      ],
      "type": "string"
     },
     "type": {
      "description": "What the input is.",
      "enum": [
       "image_url",
       "video_url",
       "audio_url"
      ],
      "type": "string"
     }
    },
    "required": [
     "type",
     "image_url"
    ],
    "type": "object"
   },
   "Job": {
    "properties": {
     "completed": {
      "description": "When the job reached its final status, in Unix seconds.",
      "type": "integer"
     },
     "cost": {
      "$ref": "#/components/schemas/Cost"
     },
     "created": {
      "type": "integer"
     },
     "error": {
      "$ref": "#/components/schemas/Problem"
     },
     "id": {
      "type": "string"
     },
     "metadata": {
      "type": "object"
     },
     "model": {
      "type": "string"
     },
     "object": {
      "enum": [
       "job"
      ],
      "type": "string"
     },
     "outputs": {
      "items": {
       "$ref": "#/components/schemas/Output"
      },
      "type": "array"
     },
     "progress": {
      "type": "integer"
     },
     "provider": {
      "type": "string"
     },
     "resolved_request": {
      "$ref": "#/components/schemas/ImageRequest",
      "description": "For a model auto job: the request as run."
     },
     "routing": {
      "$ref": "#/components/schemas/Routing"
     },
     "status": {
      "enum": [
       "queued",
       "running",
       "succeeded",
       "failed",
       "canceled",
       "expired"
      ],
      "type": "string"
     },
     "task": {
      "type": "string"
     },
     "usage": {
      "$ref": "#/components/schemas/Usage"
     },
     "warnings": {
      "items": {
       "type": "string"
      },
      "type": "array"
     }
    },
    "type": "object"
   },
   "ModelList": {
    "properties": {
     "data": {
      "items": {
       "$ref": "#/components/schemas/ModelSummary"
      },
      "type": "array"
     },
     "object": {
      "enum": [
       "list"
      ],
      "type": "string"
     }
    },
    "type": "object"
   },
   "ModelStats": {
    "description": "A model's finished runs on the router over 30 days. One that ran out of time on half or more of at least 2 runs is not listed and is tried after the others.",
    "properties": {
     "p50_seconds": {
      "type": "number"
     },
     "runs_30d": {
      "type": "integer"
     },
     "success_rate": {
      "type": "number"
     },
     "timeout_rate": {
      "type": "number"
     }
    },
    "type": "object"
   },
   "ModelSummary": {
    "properties": {
     "endpoint": {
      "type": "string"
     },
     "id": {
      "type": "string"
     },
     "input_roles": {
      "type": "object"
     },
     "name": {
      "type": "string"
     },
     "output": {
      "enum": [
       "image",
       "video",
       "audio",
       "text",
       "3d"
      ],
      "type": "string"
     },
     "pricing": {
      "items": {
       "properties": {
        "per_started_seconds": {
         "type": "integer"
        },
        "price": {
         "description": "Dollars per billing unit.",
         "type": "number"
        },
        "price_at_defaults": {
         "description": "For a tiered price: dollars per unit at the model's default settings (a resolution or mode multiplies the unit price).",
         "type": "number"
        },
        "unit": {
         "type": "string"
        }
       },
       "type": "object"
      },
      "type": "array"
     },
     "providers": {
      "items": {
       "properties": {
        "slug": {
         "type": "string"
        }
       },
       "type": "object"
      },
      "type": "array"
     },
     "requires_prompt": {
      "type": "boolean"
     },
     "stats": {
      "$ref": "#/components/schemas/ModelStats"
     },
     "task": {
      "type": "string"
     },
     "typical_cost": {
      "description": "Dollars for a typical job; null when unknown.",
      "type": "number"
     }
    },
    "type": "object"
   },
   "Output": {
    "properties": {
     "bytes": {
      "type": "integer"
     },
     "data": {
      "description": "A text model's JSON output.",
      "type": "object"
     },
     "duration_s": {
      "type": "number"
     },
     "fps": {
      "type": "number"
     },
     "has_audio": {
      "type": "boolean"
     },
     "height": {
      "type": "integer"
     },
     "id": {
      "type": "string"
     },
     "media_type": {
      "type": "string"
     },
     "sha256": {
      "type": "string"
     },
     "text": {
      "type": "string"
     },
     "type": {
      "description": "image, video, audio, 3d, text or json.",
      "type": "string"
     },
     "url": {
      "description": "A link valid for 24 hours.",
      "type": "string"
     },
     "url_expires_at": {
      "description": "Unix seconds.",
      "type": "integer"
     },
     "width": {
      "type": "integer"
     }
    },
    "type": "object"
   },
   "Pending": {
    "description": "A job still running; poll its polling_url.",
    "properties": {
     "cost": {
      "properties": {
       "estimated": {
        "type": "number"
       }
      },
      "type": "object"
     },
     "id": {
      "type": "string"
     },
     "object": {
      "type": "string"
     },
     "polling_url": {
      "type": "string"
     },
     "resolved_request": {
      "$ref": "#/components/schemas/ImageRequest"
     },
     "routing": {
      "$ref": "#/components/schemas/Routing"
     },
     "status": {
      "type": "string"
     }
    },
    "type": "object"
   },
   "Problem": {
    "properties": {
     "code": {
      "description": "auth_unavailable: The key service did not answer (503, retryable).; auto_unavailable: model auto could not pick a model (422).; bad_request: The provider rejected the request (job error).; busy: Too many large request bodies are being read at once (503, retryable; send inputs as URLs).; content_filtered: The provider's safety filter blocked the request or result (job error).; fallback_task_mismatch: A models[] fallback does a different task (400).; idempotency_key_reused: The Idempotency-Key was used with a different request (422).; input_unmeasurable: A video or audio input's length could not be read (400).; insecure_url: An input URL is not HTTPS (400).; insufficient_balance: The wallet cannot cover the job's hold (402), or the gateway refused the wallet (job error).; internal_error: An unexpected error (500).; interrupted: The router stopped while starting the job (job error).; invalid_api_key: The API.market key is missing, unknown, expired or revoked (401, or job error).; invalid_idempotency_key: Idempotency-Key is not 1 to 255 characters (400).; invalid_input_type: An input reference type is not image_url, video_url or audio_url (400).; invalid_json: The body is not a valid request (400).; invalid_url: An input is not an HTTPS URL, a data URI or a file ID (400).; job_not_found: No job with this id for this account (404).; job_not_started: The earlier request with this Idempotency-Key never started its job (409, retryable).; listing_unavailable: The listing refused this account (job error).; measure_busy: Too many inputs are being measured right now (503, retryable).; media_too_large: A data URI is over 1 MB (400).; metadata_too_large: metadata has too many keys or too long a value (400).; metadata_type: A metadata value is not a string (400).; model_required: No model was given (400).; model_unavailable: The provider has discontinued the model; choose another (job error).; n_too_large: n is outside what the model allows (400).; no_route: No provider can run the job after the filters (422).; output_unavailable: The model ran and was billed but its output could not be delivered (job error).; parameter_not_supported: A shared field the model does not take, with require_parameters (400).; parameter_out_of_range: A value outside what the model allows (400).; parameter_required: The model needs a parameter that is missing (400).; parameter_type: A parameter has the wrong type (400).; prompt_required: The model needs a prompt (400).; prompt_too_long: The prompt is too long (400).; provider_error: The provider failed to run the job (job error).; rate_limited: The listing's rate limit was reached (job error).; role_count: Too few or too many inputs of a role (400).; role_not_accepted: The model takes no input of this role (400).; start_timeout: The job could not be started within 45 s; nothing ran (503, retryable).; store_unavailable: Jobs are temporarily unavailable (503, retryable).; timeout: The job, or the listing's answer to its create, ran out of time (job error).; too_many_active_jobs: The account has 50 jobs queued or running; send more as they finish (429, retryable).; too_many_invalid_keys: Too many unknown API keys from this address in a minute (429, retryable after 60 s).; too_many_parallel_requests: Too many job requests of this account are starting at once (429, retryable).; unknown_model: No such model (404).; unknown_parameter: The model has no such parameter (400).; unknown_provider_option: A provider.options key that is not allowed (400).; unsupported_field: A field the router does not support yet, such as callback_url (400).; unsupported_response_format: response_format other than url (400).; use_case_too_long: use_case is over 2,000 characters (400).; wallet_rejected: The wallet refused the operation (500).; wallet_unavailable: The wallet did not answer (503, retryable).; wrong_endpoint: The model makes another kind of output; the detail names its endpoint (400).",
      "enum": [
       "auth_unavailable",
       "auto_unavailable",
       "bad_request",
       "busy",
       "content_filtered",
       "fallback_task_mismatch",
       "idempotency_key_reused",
       "input_unmeasurable",
       "insecure_url",
       "insufficient_balance",
       "internal_error",
       "interrupted",
       "invalid_api_key",
       "invalid_idempotency_key",
       "invalid_input_type",
       "invalid_json",
       "invalid_url",
       "job_not_found",
       "job_not_started",
       "listing_unavailable",
       "measure_busy",
       "media_too_large",
       "metadata_too_large",
       "metadata_type",
       "model_required",
       "model_unavailable",
       "n_too_large",
       "no_route",
       "output_unavailable",
       "parameter_not_supported",
       "parameter_out_of_range",
       "parameter_required",
       "parameter_type",
       "prompt_required",
       "prompt_too_long",
       "provider_error",
       "rate_limited",
       "role_count",
       "role_not_accepted",
       "start_timeout",
       "store_unavailable",
       "timeout",
       "too_many_active_jobs",
       "too_many_invalid_keys",
       "too_many_parallel_requests",
       "unknown_model",
       "unknown_parameter",
       "unknown_provider_option",
       "unsupported_field",
       "unsupported_response_format",
       "use_case_too_long",
       "wallet_rejected",
       "wallet_unavailable",
       "wrong_endpoint"
      ],
      "type": "string"
     },
     "detail": {
      "type": "string"
     },
     "param": {
      "type": "string"
     },
     "provider": {
      "type": "string"
     },
     "retryable": {
      "type": "boolean"
     },
     "status": {
      "type": "integer"
     },
     "title": {
      "type": "string"
     },
     "type": {
      "type": "string"
     }
    },
    "required": [
     "type",
     "title",
     "status",
     "code",
     "retryable"
    ],
    "type": "object"
   },
   "ProviderPrefs": {
    "additionalProperties": false,
    "properties": {
     "allow_fallbacks": {
      "default": true,
      "description": "Try another route after a failure that was not billed.",
      "type": "boolean"
     },
     "ignore": {
      "description": "Providers left out.",
      "items": {
       "type": "string"
      },
      "type": "array"
     },
     "max_price": {
      "properties": {
       "per_job": {
        "description": "Dollars: the most this job can cost you. Routes whose expected cost (a typical run) is above it are left out, and the wallet hold never exceeds it. A run that costs more is charged this amount on a pay-as-you-go plan when the provider reports what the job used, the difference (up to $20 a job) credited back to the wallet. Otherwise the job shows what it is billed and a warning in warnings.",
        "type": "number"
       }
      },
      "type": "object"
     },
     "only": {
      "description": "Providers allowed.",
      "items": {
       "type": "string"
      },
      "type": "array"
     },
     "options": {
      "description": "Per-provider options from an allow-list.",
      "type": "object"
     },
     "order": {
      "description": "Providers preferred when prices tie.",
      "items": {
       "type": "string"
      },
      "type": "array"
     },
     "require_parameters": {
      "default": true,
      "description": "Refuse shared fields the model would ignore.",
      "type": "boolean"
     },
     "sort": {
      "default": "balanced",
      "description": "Alias of priority: price is cost; latency and throughput are speed.",
      "enum": [
       "price",
       "quality",
       "latency",
       "throughput",
       "balanced"
      ],
      "type": "string"
     }
    },
    "type": "object"
   },
   "Routing": {
    "properties": {
     "attempts": {
      "items": {
       "$ref": "#/components/schemas/Attempt"
      },
      "type": "array"
     },
     "reason": {
      "description": "requested model, a fallback count, or auto: <explanation>.",
      "type": "string"
     }
    },
    "type": "object"
   },
   "Usage": {
    "properties": {
     "cost": {
      "type": "number"
     },
     "units": {
      "items": {
       "properties": {
        "quantity": {
         "type": "integer"
        },
        "type": {
         "type": "string"
        }
       },
       "type": "object"
      },
      "type": "array"
     }
    },
    "type": "object"
   }
  },
  "securitySchemes": {
   "bearer": {
    "description": "Your API.market key.",
    "scheme": "bearer",
    "type": "http"
   }
  }
 },
 "info": {
  "description": "One API for image, video, audio, understanding and 3D models listed on API.market. Every job runs through the API.market gateway on your own key and is billed there by the listing's rule; the wallet holds the most a job can cost until it is charged.",
  "title": "API.market media router",
  "version": "1"
 },
 "openapi": "3.1.0",
 "paths": {
  "/health": {
   "get": {
    "responses": {
     "200": {
      "description": "{\"status\":\"ok\"}"
     }
    },
    "summary": "Liveness."
   }
  },
  "/llms.txt": {
   "get": {
    "responses": {
     "200": {
      "description": "Text."
     }
    },
    "summary": "A plain-text guide for language models."
   }
  },
  "/openapi.json": {
   "get": {
    "responses": {
     "200": {
      "description": "OpenAPI 3.1."
     }
    },
    "summary": "This document."
   }
  },
  "/playground": {
   "get": {
    "responses": {
     "200": {
      "description": "HTML."
     }
    },
    "summary": "A page for trying models with an API.market key."
   }
  },
  "/v1/3d": {
   "post": {
    "parameters": [
     {
      "description": "wait=N (at most 45) waits for the result; images and understanding wait 30 s by default, others answer at once. A call takes at most 45 s from its arrival.",
      "in": "header",
      "name": "Prefer",
      "schema": {
       "type": "string"
      }
     },
     {
      "description": "A repeat within 24 hours returns the same job.",
      "in": "header",
      "name": "Idempotency-Key",
      "schema": {
       "maxLength": 255,
       "type": "string"
      }
     },
     {
      "description": "The model, when the body has none.",
      "in": "header",
      "name": "X-Model",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ImageRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "oneOf": [
          {
           "$ref": "#/components/schemas/Job"
          },
          {
           "$ref": "#/components/schemas/Job"
          },
          {
           "$ref": "#/components/schemas/DryRun"
          }
         ]
        }
       }
      },
      "description": "Finished in time, failed, or a dry run."
     },
     "202": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Pending"
        }
       }
      },
      "description": "Running; poll the Location."
     },
     "400": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "401": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "402": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "404": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "409": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "422": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "429": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "500": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "503": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     }
    },
    "security": [
     {
      "bearer": []
     }
    ],
    "summary": "Make 3D models and motion."
   }
  },
  "/v1/3d/models": {
   "get": {
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Models."
     }
    },
    "summary": "The 3d models a job can run on now, at live prices."
   }
  },
  "/v1/audio": {
   "post": {
    "parameters": [
     {
      "description": "wait=N (at most 45) waits for the result; images and understanding wait 30 s by default, others answer at once. A call takes at most 45 s from its arrival.",
      "in": "header",
      "name": "Prefer",
      "schema": {
       "type": "string"
      }
     },
     {
      "description": "A repeat within 24 hours returns the same job.",
      "in": "header",
      "name": "Idempotency-Key",
      "schema": {
       "maxLength": 255,
       "type": "string"
      }
     },
     {
      "description": "The model, when the body has none.",
      "in": "header",
      "name": "X-Model",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ImageRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "oneOf": [
          {
           "$ref": "#/components/schemas/Job"
          },
          {
           "$ref": "#/components/schemas/Job"
          },
          {
           "$ref": "#/components/schemas/DryRun"
          }
         ]
        }
       }
      },
      "description": "Finished in time, failed, or a dry run."
     },
     "202": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Pending"
        }
       }
      },
      "description": "Running; poll the Location."
     },
     "400": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "401": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "402": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "404": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "409": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "422": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "429": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "500": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "503": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     }
    },
    "security": [
     {
      "bearer": []
     }
    ],
    "summary": "Make speech, music and other audio."
   }
  },
  "/v1/audio/models": {
   "get": {
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Models."
     }
    },
    "summary": "The audio models a job can run on now, at live prices."
   }
  },
  "/v1/images": {
   "post": {
    "parameters": [
     {
      "description": "wait=N (at most 45) waits for the result; images and understanding wait 30 s by default, others answer at once. A call takes at most 45 s from its arrival.",
      "in": "header",
      "name": "Prefer",
      "schema": {
       "type": "string"
      }
     },
     {
      "description": "A repeat within 24 hours returns the same job.",
      "in": "header",
      "name": "Idempotency-Key",
      "schema": {
       "maxLength": 255,
       "type": "string"
      }
     },
     {
      "description": "The model, when the body has none.",
      "in": "header",
      "name": "X-Model",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ImageRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "oneOf": [
          {
           "$ref": "#/components/schemas/ImagesResponse"
          },
          {
           "$ref": "#/components/schemas/Job"
          },
          {
           "$ref": "#/components/schemas/DryRun"
          }
         ]
        }
       }
      },
      "description": "Finished in time, failed, or a dry run."
     },
     "202": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Pending"
        }
       }
      },
      "description": "Running; poll the Location."
     },
     "400": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "401": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "402": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "404": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "409": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "422": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "429": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "500": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "503": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     }
    },
    "security": [
     {
      "bearer": []
     }
    ],
    "summary": "Make or edit images."
   }
  },
  "/v1/images/models": {
   "get": {
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Models."
     }
    },
    "summary": "The image models a job can run on now, at live prices."
   }
  },
  "/v1/jobs/{id}": {
   "get": {
    "parameters": [
     {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Job"
        }
       }
      },
      "description": "The job."
     },
     "401": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "404": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "503": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     }
    },
    "security": [
     {
      "bearer": []
     }
    ],
    "summary": "One of your jobs."
   }
  },
  "/v1/models": {
   "get": {
    "parameters": [
     {
      "in": "query",
      "name": "task",
      "schema": {
       "type": "string"
      }
     },
     {
      "in": "query",
      "name": "output",
      "schema": {
       "enum": [
        "image",
        "video",
        "audio",
        "text",
        "3d"
       ],
       "type": "string"
      }
     },
     {
      "in": "query",
      "name": "priority",
      "schema": {
       "default": "balanced",
       "enum": [
        "cost",
        "speed",
        "quality",
        "balanced"
       ],
       "type": "string"
      }
     },
     {
      "description": "Dollars: models whose typical job costs at most this.",
      "in": "query",
      "name": "max_price",
      "schema": {
       "type": "number"
      }
     },
     {
      "in": "query",
      "name": "limit",
      "schema": {
       "default": 20,
       "maximum": 500,
       "minimum": 1,
       "type": "integer"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ModelList"
        }
       }
      },
      "description": "Models."
     }
    },
    "summary": "Every model a job can run on now, across all outputs, ranked by priority. No key needed."
   }
  },
  "/v1/understand": {
   "post": {
    "parameters": [
     {
      "description": "wait=N (at most 45) waits for the result; images and understanding wait 30 s by default, others answer at once. A call takes at most 45 s from its arrival.",
      "in": "header",
      "name": "Prefer",
      "schema": {
       "type": "string"
      }
     },
     {
      "description": "A repeat within 24 hours returns the same job.",
      "in": "header",
      "name": "Idempotency-Key",
      "schema": {
       "maxLength": 255,
       "type": "string"
      }
     },
     {
      "description": "The model, when the body has none.",
      "in": "header",
      "name": "X-Model",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ImageRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "oneOf": [
          {
           "$ref": "#/components/schemas/Job"
          },
          {
           "$ref": "#/components/schemas/Job"
          },
          {
           "$ref": "#/components/schemas/DryRun"
          }
         ]
        }
       }
      },
      "description": "Finished in time, failed, or a dry run."
     },
     "202": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Pending"
        }
       }
      },
      "description": "Running; poll the Location."
     },
     "400": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "401": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "402": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "404": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "409": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "422": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "429": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "500": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "503": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     }
    },
    "security": [
     {
      "bearer": []
     }
    ],
    "summary": "Captions, transcripts, OCR and detections, as text or JSON."
   }
  },
  "/v1/understand/models": {
   "get": {
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Models."
     }
    },
    "summary": "The text models a job can run on now, at live prices."
   }
  },
  "/v1/videos": {
   "post": {
    "parameters": [
     {
      "description": "wait=N (at most 45) waits for the result; images and understanding wait 30 s by default, others answer at once. A call takes at most 45 s from its arrival.",
      "in": "header",
      "name": "Prefer",
      "schema": {
       "type": "string"
      }
     },
     {
      "description": "A repeat within 24 hours returns the same job.",
      "in": "header",
      "name": "Idempotency-Key",
      "schema": {
       "maxLength": 255,
       "type": "string"
      }
     },
     {
      "description": "The model, when the body has none.",
      "in": "header",
      "name": "X-Model",
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ImageRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "oneOf": [
          {
           "$ref": "#/components/schemas/Job"
          },
          {
           "$ref": "#/components/schemas/Job"
          },
          {
           "$ref": "#/components/schemas/DryRun"
          }
         ]
        }
       }
      },
      "description": "Finished in time, failed, or a dry run."
     },
     "202": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Pending"
        }
       }
      },
      "description": "Running; poll the Location."
     },
     "400": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "401": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "402": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "404": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "409": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "422": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "429": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "500": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     },
     "503": {
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/Problem"
        }
       }
      },
      "description": "An RFC 9457 problem."
     }
    },
    "security": [
     {
      "bearer": []
     }
    ],
    "summary": "Make videos."
   }
  },
  "/v1/videos/models": {
   "get": {
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      },
      "description": "Models."
     }
    },
    "summary": "The video models a job can run on now, at live prices."
   }
  }
 },
 "servers": [
  {
   "url": "https://router.api.market"
  }
 ]
}
