{
  "openapi": "3.1.0",
  "info": {
    "title": "MiniMax H3 Image Highspeed",
    "version": "1.0.0",
    "description": "Asynchronous image generation and editing with up to 16 references and 1–10 outputs. Token-based billing; URL input and output only."
  },
  "servers": [
    {
      "url": "https://api.seedrouter.ai"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/v1/images/generations": {
      "post": {
        "operationId": "createMinimaxHighspeedImage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "model": {
                    "type": "string",
                    "const": "minimax-h3-image-highspeed"
                  },
                  "prompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32000,
                    "pattern": "\\S",
                    "description": "Image description or edit instruction; 1–32000 Unicode characters after trimming. With enhancement disabled, about the first 4096 tokens are read."
                  },
                  "images": {
                    "minItems": 1,
                    "maxItems": 16,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "image_url": {
                          "type": "string",
                          "format": "uri"
                        }
                      },
                      "required": [
                        "image_url"
                      ],
                      "additionalProperties": false
                    },
                    "description": "Editing references: 1–16 ordered public HTTP(S) image URLs without credentials. Each file: JPEG, PNG, WebP, HEIC or HEIF, at most 64 MiB, each side 128–8192 pixels, long/short at most 4. URL input only."
                  },
                  "disable_prompt_enhanced": {
                    "type": "boolean",
                    "description": "Generation only. True requires explicit pixel size or a fixed aspect_ratio. Editing always enhances prompts; true is rejected with images.",
                    "default": false
                  },
                  "n": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10,
                    "default": 1
                  },
                  "size": {
                    "type": "string",
                    "default": "auto",
                    "pattern": "^(auto|[0-9]+x[0-9]+)$",
                    "description": "auto or WIDTHxHEIGHT. Pixel area must be 655360–20000000 inclusive; width/height must be between 1/3 and 3. Explicit pixels forbid both area and aspect_ratio, even auto."
                  },
                  "aspect_ratio": {
                    "type": "string",
                    "default": "auto",
                    "pattern": "^(auto|[0-9]+:[0-9]+)$",
                    "description": "auto or X:Y. X and Y are integers 1–300, and X/Y must be between 1/3 and 3. Omit when size has pixel dimensions."
                  },
                  "area": {
                    "type": "string",
                    "enum": [
                      "1K",
                      "2K",
                      "4K"
                    ],
                    "default": "4K"
                  },
                  "output_format": {
                    "type": "string",
                    "enum": [
                      "jpeg",
                      "jpg",
                      "png"
                    ],
                    "default": "jpeg"
                  },
                  "output_compression": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100,
                    "description": "JPEG quality, 0–100. Explicit 0 is preserved. PNG ignores this field.",
                    "default": 95
                  },
                  "aigc_watermark": {
                    "type": "boolean",
                    "default": false
                  },
                  "response_format": {
                    "type": "string",
                    "const": "url",
                    "default": "url"
                  },
                  "stream": {
                    "type": "boolean",
                    "const": false,
                    "default": false
                  }
                },
                "required": [
                  "model",
                  "prompt"
                ],
                "additionalProperties": false,
                "description": "13 fields. Only model and prompt are required. No field accepts null. Use images for editing. Pixel size and area/aspect_ratio are mutually exclusive. URL results and asynchronous task polling only."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Accepted task",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "model",
                    "status"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "model": {
                      "const": "minimax-h3-image-highspeed"
                    },
                    "status": {
                      "const": "processing"
                    },
                    "created_at": {
                      "type": "integer",
                      "description": "Unix seconds"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Request or task error; see the shared error directory.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Request or task error; see the shared error directory.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Request or task error; see the shared error directory.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/tasks/{id}": {
      "get": {
        "operationId": "getMinimaxHighspeedImageTask",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Task status; output exists only after completion",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "model": {
                      "type": "string"
                    },
                    "status": {
                      "enum": [
                        "processing",
                        "completed",
                        "failed"
                      ]
                    },
                    "output": {
                      "type": "object",
                      "properties": {
                        "created": {
                          "type": "integer",
                          "description": "Creation time in Unix seconds"
                        },
                        "output_format": {
                          "enum": [
                            "jpeg",
                            "png"
                          ]
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "url"
                            ],
                            "properties": {
                              "url": {
                                "type": "string",
                                "format": "uri"
                              },
                              "size": {
                                "type": "string",
                                "pattern": "^[1-9][0-9]*x[1-9][0-9]*$"
                              },
                              "revised_prompt": {
                                "type": "string"
                              }
                            },
                            "additionalProperties": false
                          }
                        },
                        "usage": {
                          "type": "object",
                          "properties": {
                            "generated_images": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "input_tokens": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "output_tokens": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "total_tokens": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "input_tokens_details": {
                              "type": "object",
                              "properties": {
                                "text_tokens": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "image_tokens": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              }
                            },
                            "output_tokens_details": {
                              "type": "object",
                              "properties": {
                                "image_tokens": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              }
                            }
                          }
                        }
                      },
                      "additionalProperties": false
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Request or task error; see the shared error directory.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
