# "Tạo tác vụ `black-forest-labs/flux-fill-pro`"

Nguồn: https://docs.openaihub.net/api-45208963/

> API origin: `https://api.openaihub.net`. Chọn đúng nhóm API và model. Thông số dưới đây là bản tham chiếu kỹ thuật; chưa phải kết quả kiểm thử từng endpoint bằng tài khoản của bạn.


## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /replicate/v1/models/black-forest-labs/flux-fill-pro/predictions:
    post:
      summary: Tạo tác vụ `black-forest-labs/flux-fill-pro`
      deprecated: false
      description: >-
        Vui lòng dán nội dung tài liệu từ
        https://replicate.com/black-forest-labs/flux-fill-pro để tôi có thể dịch
        sang tiếng Việt và giữ nguyên Markdown, mã, định danh, URL, đường dẫn,
        phần giữ chỗ, cấu trúc JSON cùng định dạng.
      operationId: >-
        replicate_replicate_v1_models_black_forest_labs_flux_fill_pro_predictions
      tags:
        - OpenAiHub Việt Nam/OpenAiHub Tiếng Việt/Hình ảnh/Tổng hợp bản sao
        - Tái tạo
      parameters:
        - name: Authorization
          in: header
          description: Khóa API Bearer
          required: false
          example: Bearer {{YOUR_API_KEY}}
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                input:
                  type: object
                  required:
                    - image
                    - prompt
                  properties:
                    guidance:
                      type: integer
                      description: >-
                        Kiểm soát sự cân bằng giữa mức độ tuân thủ lời nhắc văn
                        bản và chất lượng/sự đa dạng của hình ảnh. Giá trị cao
                        hơn giúp kết quả đầu ra bám sát lời nhắc hơn, nhưng có
                        thể làm giảm chất lượng tổng thể của hình ảnh. Giá trị
                        thấp hơn mang lại nhiều tự do sáng tạo hơn cho kết quả
                        đầu ra, nhưng có thể ít liên quan hơn đến lời nhắc. Giá
                        trị mặc định: 60. Giá trị tối thiểu: 1.5, giá trị tối
                        đa: 100.
                    image:
                      type: string
                      description: >-
                        Các hình ảnh cần được sửa chữa. Có thể bao gồm mặt nạ
                        alpha. Phải ở định dạng jpeg, png, gif hoặc webp.
                    mask:
                      type: string
                      description: >-
                        Một hình ảnh đen trắng mô tả phần hình ảnh cần được phục
                        hồi. Các vùng màu đen sẽ được giữ nguyên và các vùng màu
                        trắng sẽ được sửa chữa. Hình này phải có cùng kích thước
                        với hình ảnh. Tham số này là tùy chọn nếu bạn đã cung
                        cấp mặt nạ alpha trong hình ảnh gốc. Hình phải có định
                        dạng jpeg, png, gif hoặc webp.
                    outpaint:
                      type: string
                      description: >-
                        Các tùy chọn để sửa nhanh hình ảnh đầu vào. Mặt nạ sẽ bị
                        bỏ qua. Giá trị mặc định: "None"
                    output_format:
                      type: string
                      description: 'Định dạng của hình ảnh đầu ra. Giá trị mặc định: "jpg".'
                    prompt:
                      type: string
                      description: Lời nhắc văn bản được tạo từ hình ảnh.
                    prompt_upsampling:
                      type: boolean
                      description: >-
                        Tự động sửa đổi câu lệnh để tạo thêm nhiều ý tưởng. Giá
                        trị mặc định: false
                    safety_tolerance:
                      type: integer
                      description: >-
                        Mức dung sai bảo mật, trong đó 1 là nghiêm ngặt nhất và
                        6 là lỏng lẻo nhất. Giá trị mặc định: 2.
                    steps:
                      type: integer
                      description: >-
                        Số bước khuếch tán. Giá trị cao hơn cung cấp chi tiết
                        tinh tế hơn, nhưng cũng mất nhiều thời gian xử lý hơn.
                        Giá trị mặc định: 50. Giá trị tối thiểu: 15, giá trị tối
                        đa: 50.
                  description: Vui lòng cung cấp nội dung tài liệu cần dịch.
                  x-apifox-orders:
                    - guidance
                    - image
                    - mask
                    - outpaint
                    - output_format
                    - prompt
                    - prompt_upsampling
                    - safety_tolerance
                    - steps
                  x-apidog-orders:
                    - guidance
                    - image
                    - mask
                    - outpaint
                    - output_format
                    - prompt
                    - prompt_upsampling
                    - safety_tolerance
                    - steps
              x-apifox-orders:
                - input
              x-apidog-orders:
                - input
            examples:
              black_forest_labsflux_fill_pro_single:
                value:
                  input:
                    guidance: 60
                    image: >-
                      https://replicate.delivery/pbxt/M0gpKVE9wmEtOQFNDOpwz1uGs0u6nK2NcE85IihwlN0ZEnMF/kill-bill-poster.jpg
                    mask: >-
                      https://replicate.delivery/pbxt/M0gpLCYdCLbnhcz95Poy66q30XW9VSCN65DoDQ8IzdzlQonw/kill-bill-mask.png
                    outpaint: Không có
                    output_format: jpg
                    prompt: áp phích phim ghi "FLUX FILL"
                    prompt_upsampling: false
                    safety_tolerance: 2
                    steps: 50
                summary: black_forest_labsflux_fill_pro_single
                description: Tạo tác vụ `black-forest-labs/flux-fill-pro`
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - status
                properties:
                  created_at:
                    type: string
                    description: Thời gian tạo
                  data_removed:
                    type: boolean
                    description: Liệu dữ liệu nhạy cảm đã được loại bỏ hay chưa
                  error:
                    type: string
                    description: Thông báo lỗi
                    nullable: true
                  id:
                    type: string
                    description: ID tài nguyên hoặc tác vụ
                  input:
                    type: object
                    properties:
                      aspect_ratio:
                        type: string
                        description: 'Tỷ lệ khung hình, ví dụ: 16:9, 9:16, 1:1'
                      input_image:
                        type: string
                        description: URL hình ảnh đầu vào hoặc Base64
                      output_format:
                        type: string
                        description: 'Định dạng đầu ra, ví dụ: png / jpeg / webp'
                      prompt:
                        type: string
                        description: Lời nhắc văn bản
                      prompt_upsampling:
                        type: boolean
                        description: Có tăng độ phân giải / cải thiện lời nhắc hay không
                      safety_tolerance:
                        type: integer
                        description: Mức dung sai của bộ lọc an toàn
                    description: Vui lòng cung cấp nội dung tài liệu cần dịch.
                    x-apifox-orders:
                      - aspect_ratio
                      - input_image
                      - output_format
                      - prompt
                      - prompt_upsampling
                      - safety_tolerance
                    x-apidog-orders:
                      - aspect_ratio
                      - input_image
                      - output_format
                      - prompt
                      - prompt_upsampling
                      - safety_tolerance
                  logs:
                    type: string
                    description: Nhật ký chạy
                  model:
                    type: string
                    description: Tên mô hình / mã định danh mô hình
                  output:
                    type: string
                    description: Kết quả đầu ra
                    nullable: true
                  status:
                    type: string
                    description: Trạng thái
                  urls:
                    type: object
                    required:
                      - cancel
                      - get
                      - stream
                      - web
                    properties:
                      cancel:
                        type: string
                        description: URL để hủy tác vụ
                      get:
                        type: string
                        description: URL để truy vấn trạng thái tác vụ
                      stream:
                        type: string
                        description: Có truyền phát phản hồi hay không
                      web:
                        type: string
                        description: URL để xem tác vụ trong trình duyệt
                    description: Danh sách URL tài nguyên
                    x-apifox-orders:
                      - cancel
                      - get
                      - stream
                      - web
                    x-apidog-orders:
                      - cancel
                      - get
                      - stream
                      - web
                  version:
                    type: string
                    description: Phiên bản
                refName: >-
                  PostReplicateV1ModelsBlackForestLabsFluxFillProPredictionsResponse
                x-apifox-orders:
                  - created_at
                  - data_removed
                  - error
                  - id
                  - input
                  - logs
                  - model
                  - output
                  - status
                  - urls
                  - version
                x-apidog-orders:
                  - created_at
                  - data_removed
                  - error
                  - id
                  - input
                  - logs
                  - model
                  - output
                  - status
                  - urls
                  - version
              examples:
                example:
                  summary: example
                  value:
                    created_at: '2025-07-30T03:10:33.786Z'
                    data_removed: false
                    id: w72vtvbb79rmc0crb57tckqt24
                    input:
                      guidance: 60
                      image: >-
                        https://replicate.delivery/pbxt/M0gpKVE9wmEtOQFNDOpwz1uGs0u6nK2NcE85IihwlN0ZEnMF/kill-bill-poster.jpg
                      mask: >-
                        https://replicate.delivery/pbxt/M0gpLCYdCLbnhcz95Poy66q30XW9VSCN65DoDQ8IzdzlQonw/kill-bill-mask.png
                      outpaint: Không có
                      output_format: jpg
                      prompt: áp phích phim ghi "FLUX FILL"
                      prompt_upsampling: false
                      safety_tolerance: 2
                      steps: 50
                    logs: ''
                    model: black-forest-labs/flux-fill-pro
                    status: starting
                    urls:
                      cancel: >-
                        https://api.replicate.com/v1/predictions/w72vtvbb79rmc0crb57tckqt24/cancel
                      get: >-
                        https://api.replicate.com/v1/predictions/w72vtvbb79rmc0crb57tckqt24
                      stream: >-
                        Vui lòng dán nội dung tài liệu cần dịch vào đây; tôi
                        không thể truy cập trực tiếp tệp từ URL này.
                      web: >-
                        Vui lòng dán nội dung tài liệu cần dịch; tôi không thể
                        truy cập nội dung từ đường dẫn này.
                    version: ẩn
          headers: {}
          x-apidog-name: ''
        '400':
          description: Yêu cầu không hợp lệ hoặc xác thực thất bại
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - message
                      - type
                    properties:
                      message:
                        type: string
                        description: Thông báo lỗi (thường kết thúc bằng mã yêu cầu)
                      type:
                        type: string
                        description: Loại lỗi; các lỗi cổng cục bộ thường là new_api_error
                        examples:
                          - new_api_error
                    x-apifox-orders:
                      - message
                      - type
                    x-apidog-orders:
                      - message
                      - type
                refName: NewApiError
                x-apifox-orders:
                  - error
                x-apidog-orders:
                  - error
              examples:
                example:
                  summary: example
                  value:
                    error:
                      message: >-
                        Yêu cầu không hợp lệ (mã yêu cầu:
                        20260805120000123456789AbCdEfGh)
                      type: new_api_error
          headers: {}
          x-apidog-name: Yêu cầu không hợp lệ hoặc xác thực thất bại
        '401':
          description: Khóa API bị thiếu hoặc không hợp lệ
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - message
                      - type
                    properties:
                      message:
                        type: string
                        description: Thông báo lỗi (thường kết thúc bằng mã yêu cầu)
                      type:
                        type: string
                        description: Loại lỗi; các lỗi cổng cục bộ thường là new_api_error
                        examples:
                          - new_api_error
                    x-apifox-orders:
                      - message
                      - type
                    x-apidog-orders:
                      - message
                      - type
                refName: NewApiError
                x-apifox-orders:
                  - error
                x-apidog-orders:
                  - error
              examples:
                example:
                  summary: example
                  value:
                    error:
                      message: >-
                        Mã thông báo không hợp lệ (request id:
                        20260805120000123456789AbCdEfGh)
                      type: new_api_error
          headers: {}
          x-apidog-name: Khóa API bị thiếu hoặc không hợp lệ
      security: []
      x-apidog-folder: OpenAiHub Việt Nam/OpenAiHub Tiếng Việt/Hình ảnh/Tổng hợp bản sao
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1218648/apis/api-45208963-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.openaihub.net
    description: Prod Env
security: []

```
