Bỏ qua để đến nội dung

Tạo tác vụ black-forest-labs/flux-fill-dev

Xem Markdownllms.txt

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: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/replicate/v1/models/black-forest-labs/flux-fill-dev/predictions:
post:
summary: Tạo tác vụ black-forest-labs/flux-fill-dev
deprecated: false
description: >-
Tài liệu chính thức:
https://replicate.com/black-forest-labs/flux-fill-dev
operationId: >-
replicate_replicate_v1_models_black_forest_labs_flux_fill_dev_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: >-
Thông tin hướng dẫn tạo hình ảnh. Giá trị mặc định: 30.
Giá trị tối thiểu: 0, giá trị tối đa: 100.
image:
type: string
description: >-
Hình ảnh cần được sửa chữa. Có thể bao gồm mặt nạ alpha.
Nếu chiều rộng hoặc chiều cao của hình ảnh không phải là
bội số của 32, hình ảnh sẽ được điều chỉnh theo bội số
gần nhất của 32. Nếu kích thước hình ảnh vượt quá
1440x1440, hình ảnh sẽ được thu nhỏ để vừa trong giới
hạn 1440x1440.
lora_scale:
type: integer
description: >-
Xác định cường độ áp dụng cho LoRA chính. Đối với suy
luận cơ bản, giá trị hợp lý nằm trong khoảng từ 0 đến 1.
Đối với go_fast, chúng tôi áp dụng hệ số nhân 1.5 lần
cho giá trị này; thông thường, hiệu năng sẽ tốt khi nhân
giá trị cơ sở với hệ số này. Bạn vẫn có thể cần thử
nghiệm để tìm ra giá trị tốt nhất cho LoRA cụ thể của
mình. Giá trị mặc định: 1. Giá trị nhỏ nhất: -1, giá trị
lớn nhất: 3.
mask:
type: string
description: >-
Một hình ảnh đen trắng mô tả phần hình ảnh cần được khôi
phục. 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.
megapixels:
type: string
description: >-
Số lượng pixel gần đúng của hình ảnh được tạo. Sử dụng
match_input để khớp với kích thước của đầu vào (tối đa
1440x1440 pixel), mặc định: "1".
num_inference_steps:
type: integer
description: >-
Số bước khử nhiễu. Phạm vi khuyến nghị là 28-50; số bước
càng ít thì chất lượng đầu ra càng thấp nhưng tốc độ
càng nhanh. Giá trị mặc định: 28. Giá trị tối thiểu: 1,
giá trị tối đa: 50.
num_outputs:
type: integer
description: >-
Số lượng đầu ra cần tạo. Giá trị mặc định: 1. Giá trị
tối thiểu: 1, giá trị tối đa: 4.
output_format:
type: string
description: 'Định dạng của hình ảnh đầu ra. Mặc định: "webp".'
output_quality:
type: integer
description: >-
Chất lượng lưu ảnh đầu ra, từ 0 đến 100. 100 là chất
lượng tốt nhất, 0 là chất lượng thấp nhất. Không liên
quan đến đầu ra .png. Mặc định: 80
prompt:
type: string
description: Lời nhắc để tạo hình ảnh.
description: Vui lòng cung cấp nội dung tài liệu cần dịch.
x-apifox-orders:
- guidance
- image
- lora_scale
- mask
- megapixels
- num_inference_steps
- num_outputs
- output_format
- output_quality
- prompt
x-apidog-orders:
- guidance
- image
- lora_scale
- mask
- megapixels
- num_inference_steps
- num_outputs
- output_format
- output_quality
- prompt
x-apifox-orders:
- input
x-apidog-orders:
- input
examples:
black_forest_labsflux_fill_dev_single:
value:
input:
guidance: 30
image: >-
https://replicate.delivery/pbxt/M0hxMJeO7wFCMr7QYNZsjRxzHhz6ntlLllMteRQNsRD7f3Nf/flux-fill-dev.webp
lora_scale: 1
mask: >-
https://replicate.delivery/pbxt/M0hxLu8a1YBcybWuumSsfoEec8ooer6JZ2fR28vuM1U0CN9m/74b40bb1-364a-461a-bec5-200a38c7bc87.png
megapixels: '1'
num_inference_steps: 28
num_outputs: 2
output_format: webp
output_quality: 80
prompt: một con tàu vũ trụ
summary: black_forest_labsflux_fill_dev_single
description: Tạo tác vụ black-forest-labs/flux-fill-dev
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: >-
PostReplicateV1ModelsBlackForestLabsFluxFillDevPredictionsResponse
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:03:25.864Z'
data_removed: false
id: tv3jnp73n1rmc0crb54b3srz94
input:
guidance: 30
image: >-
https://replicate.delivery/pbxt/M0hxMJeO7wFCMr7QYNZsjRxzHhz6ntlLllMteRQNsRD7f3Nf/flux-fill-dev.webp
lora_scale: 1
mask: >-
https://replicate.delivery/pbxt/M0hxLu8a1YBcybWuumSsfoEec8ooer6JZ2fR28vuM1U0CN9m/74b40bb1-364a-461a-bec5-200a38c7bc87.png
megapixels: '1'
num_inference_steps: 28
num_outputs: 1
output_format: webp
output_quality: 80
prompt: một con tàu vũ trụ
logs: ''
model: black-forest-labs/flux-fill-dev
status: starting
urls:
cancel: >-
https://api.replicate.com/v1/predictions/tv3jnp73n1rmc0crb54b3srz94/cancel
get: >-
https://api.replicate.com/v1/predictions/tv3jnp73n1rmc0crb54b3srz94
stream: >-
Vui lòng dán nội dung tài liệu vào đây để tôi có thể
dịch sang tiếng Việt mà vẫn giữ nguyên Markdown, mã,
định danh, URL, đường dẫn, phần giữ chỗ, cấu trúc JSON
và định dạng.
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ừ URL 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-45208962-run
components:
schemas: {}
securitySchemes: {}
servers:
- url: https://api.openaihub.net
description: Prod Env
security: []