{
  "openapi": "3.0.0",
  "info": {
    "title": "Flux",
    "version": "1.0.0",
    "description": "API reference for Flux on Ace Data Cloud."
  },
  "servers": [
    {
      "url": "https://api.acedata.cloud",
      "description": "Ace Data Cloud API"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API token from https://platform.acedata.cloud"
      }
    },
    "schemas": {
      "FluxTaskRequestPayload": {
        "type": "object",
        "additionalProperties": true,
        "description": "Openapi.4F36Fc315A9542Acabfc34670C40238C.Fluxtaskrequestpayload.2471De364B16"
      },
      "FluxTaskResultPayload": {
        "type": "object",
        "additionalProperties": true,
        "description": "Openapi.4F36Fc315A9542Acabfc34670C40238C.Fluxtaskresultpayload.9B1Afae6D3Bb"
      },
      "FluxTaskRecord": {
        "type": "object",
        "required": [
          "id",
          "type",
          "created_at",
          "trace_id",
          "request"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Openapi.4F36Fc315A9542Acabfc34670C40238C.Id.7D1063D65Da7"
          },
          "type": {
            "type": "string",
            "description": "Openapi.4F36Fc315A9542Acabfc34670C40238C.Type.C4B0F3E3D20B"
          },
          "trace_id": {
            "type": "string",
            "description": "Openapi.4F36Fc315A9542Acabfc34670C40238C.Trace Id.A7D49A5952De"
          },
          "request": {
            "$ref": "#/components/schemas/FluxTaskRequestPayload"
          },
          "response": {
            "$ref": "#/components/schemas/FluxTaskResultPayload"
          },
          "created_at": {
            "type": "number",
            "format": "double",
            "description": "Openapi.4F36Fc315A9542Acabfc34670C40238C.Created At.3C697212D54C"
          },
          "started_at": {
            "type": "number",
            "format": "double",
            "description": "Openapi.4F36Fc315A9542Acabfc34670C40238C.Started At.De18Ade3Ecbf"
          },
          "finished_at": {
            "type": "number",
            "format": "double",
            "nullable": true,
            "description": "Openapi.4F36Fc315A9542Acabfc34670C40238C.Finished At.173E262Fa0Bc"
          },
          "elapsed": {
            "type": "number",
            "format": "double",
            "minimum": 0,
            "nullable": true,
            "description": "Openapi.4F36Fc315A9542Acabfc34670C40238C.Elapsed.517693423F56"
          },
          "user_id": {
            "type": "string",
            "description": "Openapi.4F36Fc315A9542Acabfc34670C40238C.User Id.6C386A455Faf"
          },
          "actor_user_id": {
            "type": "string",
            "nullable": true,
            "description": "Openapi.4F36Fc315A9542Acabfc34670C40238C.Actor User Id.4B3D015B0Afe"
          },
          "api_id": {
            "type": "string",
            "description": "Openapi.4F36Fc315A9542Acabfc34670C40238C.Api Id.Dcd4A9Ddb513"
          },
          "application_id": {
            "type": "string",
            "description": "Openapi.4F36Fc315A9542Acabfc34670C40238C.Application Id.28C3783880F7"
          },
          "credential_id": {
            "type": "string",
            "nullable": true,
            "description": "Openapi.4F36Fc315A9542Acabfc34670C40238C.Credential Id.21Caf434Ca19"
          },
          "authorization_id": {
            "type": "string",
            "nullable": true,
            "description": "Openapi.4F36Fc315A9542Acabfc34670C40238C.Authorization Id.3F3A9Ac5D495"
          }
        }
      },
      "Flux3VideoInputsBody": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/Flux3VideoT2VInputs"
          },
          {
            "$ref": "#/components/schemas/Flux3VideoI2VInputs"
          },
          {
            "$ref": "#/components/schemas/Flux3VideoV2VInputs"
          },
          {
            "$ref": "#/components/schemas/Flux3VideoDraftEnhanceInputs"
          }
        ],
        "discriminator": {
          "propertyName": "mode",
          "mapping": {
            "draft_enhance": "#/components/schemas/Flux3VideoDraftEnhanceInputs",
            "i2v": "#/components/schemas/Flux3VideoI2VInputs",
            "t2v": "#/components/schemas/Flux3VideoT2VInputs",
            "v2v": "#/components/schemas/Flux3VideoV2VInputs"
          }
        }
      },
      "Flux3VideoT2VInputs": {
        "properties": {
          "prompt": {
            "type": "string"
          },
          "aspect_ratio": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "21:9",
                  "2:1",
                  "16:9",
                  "4:3",
                  "1:1",
                  "3:4",
                  "9:16",
                  "9:21"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "auto"
                ]
              }
            ],
            "default": "auto"
          },
          "duration": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 20,
                "minimum": 5
              },
              {
                "type": "string",
                "enum": [
                  "auto"
                ]
              }
            ],
            "default": "auto"
          },
          "resolution": {
            "type": "string",
            "enum": [
              "hd",
              "fhd",
              "qhd",
              "uhd"
            ],
            "default": "hd"
          },
          "version": {
            "type": "string",
            "enum": [
              "latest"
            ],
            "default": "latest"
          },
          "generate_audio": {
            "type": "boolean",
            "default": true
          },
          "safety_tolerance": {
            "type": "integer",
            "maximum": 4,
            "minimum": 0,
            "default": 2
          },
          "draft": {
            "type": "boolean",
            "default": false
          },
          "mode": {
            "type": "string",
            "enum": [
              "t2v"
            ]
          },
          "async": {
            "type": "boolean",
            "default": false
          },
          "callback_url": {
            "type": "string",
            "format": "uri"
          },
          "model": {
            "type": "string",
            "enum": [
              "flux-3"
            ],
            "default": "flux-3"
          },
          "action": {
            "type": "string",
            "enum": [
              "generate"
            ],
            "default": "generate"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "prompt",
          "mode"
        ]
      },
      "Flux3VideoI2VInputs": {
        "properties": {
          "prompt": {
            "type": "string"
          },
          "aspect_ratio": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "21:9",
                  "2:1",
                  "16:9",
                  "4:3",
                  "1:1",
                  "3:4",
                  "9:16",
                  "9:21"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "auto"
                ]
              }
            ],
            "default": "auto"
          },
          "duration": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 20,
                "minimum": 5
              },
              {
                "type": "string",
                "enum": [
                  "auto"
                ]
              }
            ],
            "default": "auto"
          },
          "resolution": {
            "type": "string",
            "enum": [
              "hd",
              "fhd",
              "qhd",
              "uhd"
            ],
            "default": "hd"
          },
          "version": {
            "type": "string",
            "enum": [
              "latest"
            ],
            "default": "latest"
          },
          "generate_audio": {
            "type": "boolean",
            "default": true
          },
          "safety_tolerance": {
            "type": "integer",
            "maximum": 4,
            "minimum": 0,
            "default": 2
          },
          "draft": {
            "type": "boolean",
            "default": false
          },
          "mode": {
            "type": "string",
            "enum": [
              "i2v"
            ]
          },
          "keyframes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "maxItems": 2,
                "minItems": 2,
                "items": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "string"
                    }
                  ]
                }
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "items": {
                  "type": "array",
                  "maxItems": 2,
                  "minItems": 2,
                  "items": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string"
                      }
                    ]
                  }
                },
                "type": "array"
              }
            ]
          },
          "async": {
            "type": "boolean",
            "default": false
          },
          "callback_url": {
            "type": "string",
            "format": "uri"
          },
          "model": {
            "type": "string",
            "enum": [
              "flux-3"
            ],
            "default": "flux-3"
          },
          "action": {
            "type": "string",
            "enum": [
              "generate"
            ],
            "default": "generate"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "prompt",
          "mode",
          "keyframes"
        ]
      },
      "Flux3VideoV2VInputs": {
        "properties": {
          "prompt": {
            "type": "string"
          },
          "aspect_ratio": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "21:9",
                  "2:1",
                  "16:9",
                  "4:3",
                  "1:1",
                  "3:4",
                  "9:16",
                  "9:21"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "auto"
                ]
              }
            ],
            "default": "auto"
          },
          "duration": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 15,
                "minimum": 5
              },
              {
                "type": "string",
                "enum": [
                  "auto"
                ]
              }
            ],
            "default": "auto"
          },
          "resolution": {
            "type": "string",
            "enum": [
              "hd",
              "fhd",
              "qhd",
              "uhd"
            ],
            "default": "hd"
          },
          "version": {
            "type": "string",
            "enum": [
              "latest"
            ],
            "default": "latest"
          },
          "generate_audio": {
            "type": "boolean",
            "default": true
          },
          "safety_tolerance": {
            "type": "integer",
            "maximum": 4,
            "minimum": 0,
            "default": 2
          },
          "draft": {
            "type": "boolean",
            "default": false
          },
          "mode": {
            "type": "string",
            "enum": [
              "v2v"
            ]
          },
          "start_video": {
            "type": "string"
          },
          "async": {
            "type": "boolean",
            "default": false
          },
          "callback_url": {
            "type": "string",
            "format": "uri"
          },
          "model": {
            "type": "string",
            "enum": [
              "flux-3"
            ],
            "default": "flux-3"
          },
          "action": {
            "type": "string",
            "enum": [
              "generate"
            ],
            "default": "generate"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "prompt",
          "mode",
          "start_video"
        ]
      },
      "Flux3VideoDraftEnhanceInputs": {
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "draft_enhance"
            ]
          },
          "resolution": {
            "type": "string",
            "enum": [
              "hd",
              "fhd",
              "qhd",
              "uhd"
            ],
            "default": "fhd"
          },
          "safety_tolerance": {
            "type": "integer",
            "maximum": 4,
            "minimum": 0,
            "default": 2
          },
          "draft_task_id": {
            "type": "string"
          },
          "async": {
            "type": "boolean",
            "default": false
          },
          "callback_url": {
            "type": "string",
            "format": "uri"
          },
          "model": {
            "type": "string",
            "enum": [
              "flux-3"
            ],
            "default": "flux-3"
          },
          "action": {
            "type": "string",
            "enum": [
              "generate"
            ],
            "default": "generate"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "mode",
          "draft_task_id"
        ]
      },
      "FluxVideoInputsBody": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/Flux3VideoInputsBody"
          }
        ],
        "description": "Flux Video Action Description",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "generate"
            ],
            "default": "generate"
          }
        }
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/flux/images": {
      "post": {
        "summary": "Flux Images",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "data": [
                      {
                        "seed": "pop upbeat",
                        "prompt": "a christmas song",
                        "image_url": "https://cdn.acedata.cloud/e724d7f13d.png"
                      }
                    ],
                    "success": true
                  },
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "seed": {
                            "type": "string"
                          },
                          "prompt": {
                            "type": "string"
                          },
                          "image_url": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      },
                      "description": "Openapi.Deefc5D77F2243E9929Ef2B6Afee60B7.Data.8C359Fc8209C"
                    },
                    "success": {
                      "type": "boolean",
                      "description": "Flux Images Response 200 Success"
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "seed": "pop upbeat",
                      "prompt": "a christmas song",
                      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png"
                    }
                  ],
                  "success": true
                }
              }
            },
            "description": "Flux Images Response 200"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "example": {
                        "error": {
                          "code": "token_mismatched",
                          "message": "The specified token is not matched with API."
                        },
                        "trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
                      },
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "token_mismatched",
                              "description": "Flux Images Response 400 Error Code"
                            },
                            "message": {
                              "type": "string",
                              "example": "The specified token is not matched with API.",
                              "description": "Flux Images Response 400 Error Message"
                            }
                          }
                        },
                        "trace_id": {
                          "type": "string",
                          "description": "Flux Images Response 400 Trace Id"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "example": {
                        "error": {
                          "code": "api_not_implemented",
                          "message": "The API is not implemented."
                        },
                        "trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
                      },
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "api_not_implemented",
                              "description": "Flux Images Response 400 Error Code 2"
                            },
                            "message": {
                              "type": "string",
                              "example": "The API is not implemented.",
                              "description": "Flux Images Response 400 Error Message 2"
                            }
                          }
                        },
                        "trace_id": {
                          "type": "string",
                          "description": "Flux Images Response 400 Trace Id 2"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "example": {
                        "error": {
                          "code": "disabled",
                          "message": "Your application has been disabled by Ace Data Cloud due to abnormal usage behavior, please contact our support to get more information."
                        },
                        "trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
                      },
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "disabled",
                              "description": "Flux Images Response 400 Error Code 3"
                            },
                            "message": {
                              "type": "string",
                              "example": "Your application has been disabled by Ace Data Cloud due to abnormal usage behavior, please contact our support to get more information.",
                              "description": "Flux Images Response 400 Error Message 3"
                            }
                          }
                        },
                        "trace_id": {
                          "type": "string",
                          "description": "Flux Images Response 400 Trace Id 3"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "example": {
                        "error": {
                          "code": "bad_request",
                          "message": "model is invalid."
                        },
                        "trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
                      },
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "bad_request",
                              "description": "Flux Images Response 400 Error Code 4"
                            },
                            "message": {
                              "type": "string",
                              "example": "model is invalid.",
                              "description": "Flux Images Response 400 Error Message 4"
                            }
                          }
                        },
                        "trace_id": {
                          "type": "string",
                          "description": "Flux Images Response 400 Trace Id 4"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "example": {
                        "error": {
                          "code": "no_token",
                          "message": "No token specified for the request."
                        },
                        "trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
                      },
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "no_token",
                              "description": "Flux Images Response 400 Error Code 5"
                            },
                            "message": {
                              "type": "string",
                              "example": "No token specified for the request.",
                              "description": "Flux Images Response 400 Error Message 5"
                            }
                          }
                        },
                        "trace_id": {
                          "type": "string",
                          "description": "Flux Images Response 400 Trace Id 5"
                        }
                      }
                    }
                  ]
                }
              }
            },
            "description": "Flux Images Response 400"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "example": {
                        "error": {
                          "code": "invalid_token",
                          "message": "The specified token is invalid or wrong."
                        },
                        "trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
                      },
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "invalid_token",
                              "description": "Flux Images Response 401 Error Code"
                            },
                            "message": {
                              "type": "string",
                              "example": "The specified token is invalid or wrong.",
                              "description": "Flux Images Response 401 Error Message"
                            }
                          }
                        },
                        "trace_id": {
                          "type": "string",
                          "description": "Flux Images Response 401 Trace Id"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "example": {
                        "error": {
                          "code": "token_expired",
                          "message": "token expired."
                        },
                        "trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
                      },
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "token_expired",
                              "description": "Flux Images Response 401 Error Code 2"
                            },
                            "message": {
                              "type": "string",
                              "example": "token expired.",
                              "description": "Flux Images Response 401 Error Message 2"
                            }
                          }
                        },
                        "trace_id": {
                          "type": "string",
                          "description": "Flux Images Response 401 Trace Id 2"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "example": {
                        "error": {
                          "code": "token_mismatched",
                          "message": "token and api does not match."
                        },
                        "trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
                      },
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "token_mismatched",
                              "description": "Flux Images Response 401 Error Code 3"
                            },
                            "message": {
                              "type": "string",
                              "example": "token and api does not match.",
                              "description": "Flux Images Response 401 Error Message 3"
                            }
                          }
                        },
                        "trace_id": {
                          "type": "string",
                          "description": "Flux Images Response 401 Trace Id 3"
                        }
                      }
                    }
                  ]
                }
              }
            },
            "description": "Flux Images Response 401"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "example": {
                        "error": {
                          "code": "used_up",
                          "message": "Your balance is not sufficient for current request, please buy more in Ace Data Cloud."
                        },
                        "trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
                      },
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "used_up",
                              "description": "Flux Images Response 403 Error Code"
                            },
                            "message": {
                              "type": "string",
                              "example": "Your balance is not sufficient for current request, please buy more in Ace Data Cloud.",
                              "description": "Flux Images Response 403 Error Message"
                            }
                          }
                        },
                        "trace_id": {
                          "type": "string",
                          "description": "Flux Images Response 403 Trace Id"
                        }
                      }
                    }
                  ]
                }
              }
            },
            "description": "Flux Images Response 403"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "example": {
                        "error": {
                          "code": "no_api",
                          "message": "API does not exist, please make sure url is correct."
                        },
                        "trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
                      },
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "no_api",
                              "description": "Flux Images Response 404 Error Code"
                            },
                            "message": {
                              "type": "string",
                              "example": "API does not exist, please make sure url is correct.",
                              "description": "Flux Images Response 404 Error Message"
                            }
                          }
                        },
                        "trace_id": {
                          "type": "string",
                          "description": "Flux Images Response 404 Trace Id"
                        }
                      }
                    }
                  ]
                }
              }
            },
            "description": "Flux Images Response 404"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "example": {
                        "error": {
                          "code": "too_many_requests",
                          "message": "You have exceeded the rate limit."
                        },
                        "trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
                      },
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "too_many_requests",
                              "description": "Flux Images Response 429 Error Code"
                            },
                            "message": {
                              "type": "string",
                              "example": "You have exceeded the rate limit.",
                              "description": "Flux Images Response 429 Error Message"
                            }
                          }
                        },
                        "trace_id": {
                          "type": "string",
                          "description": "Flux Images Response 429 Trace Id"
                        }
                      }
                    }
                  ]
                }
              }
            },
            "description": "Flux Images Response 429"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "example": {
                        "error": {
                          "code": "api_error",
                          "message": "Internal server error."
                        },
                        "trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
                      },
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "api_error",
                              "description": "Flux Images Response 500 Error Code"
                            },
                            "message": {
                              "type": "string",
                              "example": "Internal server error.",
                              "description": "Flux Images Response 500 Error Message"
                            }
                          }
                        },
                        "trace_id": {
                          "type": "string",
                          "description": "Flux Images Response 500 Trace Id"
                        }
                      }
                    }
                  ]
                }
              }
            },
            "description": "Flux Images Response 500"
          }
        },
        "parameters": [
          {
            "in": "header",
            "name": "accept",
            "schema": {
              "enum": [
                "application/json",
                "application/x-ndjson"
              ],
              "type": "string"
            },
            "required": false,
            "description": "Flux Images Param Accept"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "action",
                  "prompt",
                  "size"
                ],
                "properties": {
                  "size": {
                    "type": "string",
                    "example": "1024x1024",
                    "description": "Flux Images Size"
                  },
                  "count": {
                    "type": "number",
                    "description": "Flux Images Count"
                  },
                  "model": {
                    "enum": [
                      "flux-dev",
                      "flux-pro",
                      "flux-kontext-pro",
                      "flux-kontext-max",
                      "flux-2-flex",
                      "flux-2-pro",
                      "flux-2-max",
                      "flux-2-klein"
                    ],
                    "type": "string",
                    "example": "flux-dev",
                    "description": "Flux Images Model"
                  },
                  "action": {
                    "enum": [
                      "generate",
                      "edit"
                    ],
                    "type": "string",
                    "example": "generate",
                    "description": "Flux Images Action"
                  },
                  "prompt": {
                    "type": "string",
                    "example": "a white siamese cat",
                    "description": "Flux Images Prompt"
                  },
                  "image_url": {
                    "type": "string",
                    "description": "Flux Images Image Url"
                  },
                  "callback_url": {
                    "type": "string",
                    "description": "Flux Images Callback Url"
                  },
                  "async": {
                    "type": "boolean",
                    "description": "Flux Images Async"
                  }
                }
              }
            }
          },
          "required": true
        },
        "operationId": "createFluxImages"
      }
    },
    "/flux/tasks": {
      "post": {
        "summary": "Flux Tasks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/FluxTaskRecord"
                    },
                    {
                      "type": "object",
                      "required": [
                        "items",
                        "count"
                      ],
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/FluxTaskRecord"
                          },
                          "description": "Openapi.4F36Fc315A9542Acabfc34670C40238C.Items.918D36350638"
                        },
                        "count": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Openapi.4F36Fc315A9542Acabfc34670C40238C.Count.B3C788A64C99"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "description": "Openapi.4F36Fc315A9542Acabfc34670C40238C.2.2B82557414F8"
                    }
                  ]
                },
                "example": {
                  "items": [],
                  "count": 0
                }
              }
            },
            "description": "Flux Tasks Response 200"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "example": {
                        "error": {
                          "code": "token_mismatched",
                          "message": "The specified token is not matched with API."
                        },
                        "trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
                      },
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "token_mismatched",
                              "description": "Flux Tasks Response 400 Error Code"
                            },
                            "message": {
                              "type": "string",
                              "example": "The specified token is not matched with API.",
                              "description": "Flux Tasks Response 400 Error Message"
                            }
                          }
                        },
                        "trace_id": {
                          "type": "string",
                          "description": "Flux Tasks Response 400 Trace Id"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "example": {
                        "error": {
                          "code": "api_not_implemented",
                          "message": "The API is not implemented."
                        },
                        "trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
                      },
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "api_not_implemented",
                              "description": "Flux Tasks Response 400 Error Code 2"
                            },
                            "message": {
                              "type": "string",
                              "example": "The API is not implemented.",
                              "description": "Flux Tasks Response 400 Error Message 2"
                            }
                          }
                        },
                        "trace_id": {
                          "type": "string",
                          "description": "Flux Tasks Response 400 Trace Id 2"
                        }
                      }
                    }
                  ]
                }
              }
            },
            "description": "Flux Tasks Response 400"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "example": {
                        "error": {
                          "code": "invalid_token",
                          "message": "The specified token is invalid or wrong."
                        },
                        "trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
                      },
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "invalid_token",
                              "description": "Flux Tasks Response 401 Error Code"
                            },
                            "message": {
                              "type": "string",
                              "example": "The specified token is invalid or wrong.",
                              "description": "Flux Tasks Response 401 Error Message"
                            }
                          }
                        },
                        "trace_id": {
                          "type": "string",
                          "description": "Flux Tasks Response 401 Trace Id"
                        }
                      }
                    }
                  ]
                }
              }
            },
            "description": "Flux Tasks Response 401"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "example": {
                        "error": {
                          "code": "too_many_requests",
                          "message": "You have exceeded the rate limit."
                        },
                        "trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
                      },
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "too_many_requests",
                              "description": "Flux Tasks Response 429 Error Code"
                            },
                            "message": {
                              "type": "string",
                              "example": "You have exceeded the rate limit.",
                              "description": "Flux Tasks Response 429 Error Message"
                            }
                          }
                        },
                        "trace_id": {
                          "type": "string",
                          "description": "Flux Tasks Response 429 Trace Id"
                        }
                      }
                    }
                  ]
                }
              }
            },
            "description": "Flux Tasks Response 429"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "example": {
                        "error": {
                          "code": "api_error",
                          "message": "Internal server error."
                        },
                        "trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
                      },
                      "properties": {
                        "error": {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string",
                              "example": "api_error",
                              "description": "Flux Tasks Response 500 Error Code"
                            },
                            "message": {
                              "type": "string",
                              "example": "Internal server error.",
                              "description": "Flux Tasks Response 500 Error Message"
                            }
                          }
                        },
                        "trace_id": {
                          "type": "string",
                          "description": "Flux Tasks Response 500 Trace Id"
                        }
                      }
                    }
                  ]
                }
              }
            },
            "description": "Flux Tasks Response 500"
          }
        },
        "parameters": [
          {
            "in": "header",
            "name": "accept",
            "schema": {
              "enum": [
                "application/json"
              ],
              "type": "string"
            },
            "required": false,
            "description": "Flux Tasks Param Accept"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Flux Tasks Id"
                  },
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Flux Tasks Ids"
                  },
                  "action": {
                    "enum": [
                      "retrieve",
                      "retrieve_batch"
                    ],
                    "type": "string",
                    "default": "retrieve",
                    "description": "Flux Tasks Action"
                  }
                },
                "example": {
                  "action": "retrieve",
                  "id": "task-id"
                }
              }
            }
          },
          "required": true
        },
        "operationId": "queryFluxTasks"
      }
    },
    "/flux/videos": {
      "post": {
        "operationId": "flux_generate_video",
        "summary": "Flux Generate Summary",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FluxVideoInputsBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Flux Generate Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "task_id": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "model": {
                            "type": "string"
                          },
                          "video_url": {
                            "type": "string"
                          },
                          "seconds": {
                            "type": "number"
                          },
                          "width": {
                            "type": "integer"
                          },
                          "height": {
                            "type": "integer"
                          },
                          "fps": {
                            "type": "number"
                          },
                          "draft_task_id": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "seconds": {
                          "type": "number"
                        },
                        "output_mp_seconds": {
                          "type": "number"
                        },
                        "mode": {
                          "type": "string"
                        },
                        "resolution": {
                          "type": "string"
                        },
                        "draft": {
                          "type": "boolean"
                        },
                        "action": {
                          "type": "string",
                          "enum": [
                            "generate"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Flux Video Unavailable Description",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    },
                    "trace_id": {
                      "type": "string"
                    },
                    "task_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
