curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"model": "blackforestlabs/flux-2-flex/text-to-image",
"input": {
"prompt": "An overhead photograph of an open naturalist's field notebook lying on a sun-warmed basalt rock beside a tide pool. The two cream, lightly textured pages are filled with delicate pencil and watercolour studies: on the left page a purple ochre sea star, a giant green anemone with open tentacles, and a hermit crab in a turban-snail shell; on the right page a cluster of goose barnacles, a small tidepool sculpin, and a strand of rockweed. Each drawing has a neat handwritten ink label: \"Pisaster ochraceus\", \"Anthopleura xanthogrammica\", \"Pagurus samuelis\", \"Pollicipes polymerus\", \"Oligocottus maculosus\", \"Fucus distichus\". Across the top of the left page, the handwritten heading reads exactly \"LOW TIDE 0.3 m - 14 MAY\". Small measurement ticks and fine arrows point to anatomical details. A graphite pencil, a small brass magnifier and a water brush rest on the pages; a few drops of seawater and grains of sand sit near the paper edge. Soft overcast light, true-to-life paper texture, visible watercolour blooms and pencil grain, legible correctly spelled handwriting, no other text, no logos, no watermark.",
"size": "4:3",
"resolution": "1K"
}
}
EOF{
"code": 200,
"data": {
"task_id": "SBR3R4D3GOFPXM1Z",
"status": "running",
"created_time": "2026-09-26T11:07:50"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Request timeout{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Flux
FLUX.2 Flex 文生图
FLUX.2 Flex 文生图 API 用于探索图像构思,通过描述性提示词塑造构图和风格,输出 1K 或 2K。
POST
/
api
/
generate
/
submit
curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"model": "blackforestlabs/flux-2-flex/text-to-image",
"input": {
"prompt": "An overhead photograph of an open naturalist's field notebook lying on a sun-warmed basalt rock beside a tide pool. The two cream, lightly textured pages are filled with delicate pencil and watercolour studies: on the left page a purple ochre sea star, a giant green anemone with open tentacles, and a hermit crab in a turban-snail shell; on the right page a cluster of goose barnacles, a small tidepool sculpin, and a strand of rockweed. Each drawing has a neat handwritten ink label: \"Pisaster ochraceus\", \"Anthopleura xanthogrammica\", \"Pagurus samuelis\", \"Pollicipes polymerus\", \"Oligocottus maculosus\", \"Fucus distichus\". Across the top of the left page, the handwritten heading reads exactly \"LOW TIDE 0.3 m - 14 MAY\". Small measurement ticks and fine arrows point to anatomical details. A graphite pencil, a small brass magnifier and a water brush rest on the pages; a few drops of seawater and grains of sand sit near the paper edge. Soft overcast light, true-to-life paper texture, visible watercolour blooms and pencil grain, legible correctly spelled handwriting, no other text, no logos, no watermark.",
"size": "4:3",
"resolution": "1K"
}
}
EOF{
"code": 200,
"data": {
"task_id": "SBR3R4D3GOFPXM1Z",
"status": "running",
"created_time": "2026-09-26T11:07:50"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Request timeout{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}- 提交后会返回
task_id。如果提供了callback_url,当任务状态变为finished或failed时,系统会向callback_url发送 POST 请求。 - 无论是否提供
callback_url,都可以通过统一的查询任务状态接口获取结果。
模型
- blackforestlabs/flux-2-flex/text-to-image - 根据文本提示词生成图像。
功能
- 根据文本提示词生成图像。
- 可选
1K、2K输出分辨率。
输出选项
图像尺寸
size:必填。可选值:1:1、4:3、3:4、16:9、9:16、3:2、2:3、auto。
分辨率
resolution:必填。可选值:1K、2K。
高级参数
model 和可选的 callback_url 放在请求根级。所有工作流参数(包括输出选项)都放在 input 内。
发送本页列出的 input 字段。
提示词
prompt:必填。描述期望的图像。长度:3-5,000 个字符。
已验证示例
此示例通过 Vidgo API 生成,也是 Playground 中的默认示例。源图和结果图托管在 Vidgo CDN 上。
{
"code": 200,
"data": {
"task_id": "SBR3R4D3GOFPXM1Z",
"status": "finished",
"files": [
{
"file_type": "image",
"file_url": "https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-flex/text-to-image/v1/02/output.jpg"
}
],
"created_time": "2026-09-26T11:07:50",
"error_message": null,
"progress": 100
}
}
授权
使用 VIDGO_API_KEY。
请求体
application/json