图片
Bonsai 图像生成器
输入提示词即可获得 PNG:在您连接的设备上运行的紧凑型 1-bit Bonsai Image 文生图。
Bonsai Image by Prism ML; FLUX.2 klein by Black Forest Labs; Qwen3 by Alibaba Cloud
模型许可证
Prism ML Bonsai Image binary DiT · Apache-2.0
Retain complete Apache-2.0 licence, upstream copyright and NOTICE texts; prominently identify modified files. Patent termination and trademark limitations apply. Prism ML requests public attribution, preserved here and in the catalog.
FLUX.2 klein VAE and shared pipeline/tokenizer derivatives · Apache-2.0
Retain complete Apache-2.0 licence, upstream copyright and NOTICE texts; prominently identify modified files. Patent termination and trademark limitations apply.
Qwen3-4B text encoder distributed by FLUX.2 klein · Apache-2.0
API 参考
通过 REST 提交
使用您的个人 API 密钥(msk_…),从您自己的工具为此工作负载创建任务。以这种方式启动的任务会在您于您的设备中连接的同一批设备上运行——至少需要有一台在线。
https://cp.meshlabs.cloud/v1/organizations/jobs使用 X-Organization-Api-Key: msk_your_personal_api_key 进行身份验证。该请求头名称与组织密钥相同;个人密钥使用相同的端点。
POST https://cp.meshlabs.cloud/v1/organizations/job-inputs/presign,将文件上传到返回的 upload_url,然后在 job_spec 中传入 download_url(例如作为 input_image_url)。请求体
{
"workload_type": "bonsai-image-binary-4b",
"job_spec": {
"prompt": "A photorealistic lighthouse at dusk",
"width": 1024,
"height": 1024,
"strength": 0.8,
"steps": 4,
"shift": 3,
"compression_method": "fp16"
}
}job_spec 字段
| 字段 | 必填 | 默认值 | 说明 |
|---|---|---|---|
prompt | 是 | — | 图片的文字描述。 |
input_image_url | 否 | — | Optional input image for image editing (img2img). When set, the image is VAE-encoded and mixed with noise by 'strength'; the prompt describes the desired edit. |
width | 否 | 1024 | 输出宽度,单位为像素(16 的倍数)。 |
height | 否 | 1024 | 输出高度,单位为像素(16 的倍数)。 |
strength | 否 | 0.8 | img2img noise fraction: 0.3 = light touch-up, 0.8 = heavy edit, 1.0 = ignore the input image. Only used with input_image_url. |
steps | 否 | 4 | 去噪步数(Bonsai Image 已蒸馏为 4 步)。 |
seed | 否 | — | 用于可复现生成的随机种子。 |
shift | 否 | 3 | 流匹配调度偏移。该模型按 3.0 设计。 |
compression_method | 否 | fp16 | 用于节点间 FP32 DiT 激活值交接的编解码器。 |
cURL
curl -X POST https://cp.meshlabs.cloud/v1/organizations/jobs \
-H "X-Organization-Api-Key: msk_your_personal_api_key" \
-H "Content-Type: application/json" \
-d '{
"workload_type": "bonsai-image-binary-4b",
"job_spec": {
"prompt": "A photorealistic lighthouse at dusk",
"width": 1024,
"height": 1024,
"strength": 0.8,
"steps": 4,
"shift": 3,
"compression_method": "fp16"
}
}'https://cp.meshlabs.cloud/v1/organizations/jobs/{job_id}使用同一 API 密钥轮询,直到 status 进入终态(COMPLETED、FAILED、CANCELED 或 MODERATION_BLOCKED)。启用内容审核时,任务可能会先处于 MODERATION_PENDING 状态,然后才进入计算队列。已完成的任务会在每个输出上包含预签名的 download_url 值。
创建响应
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"workload_type": "bonsai-image-binary-4b",
"status": "PENDING",
"job_spec_json": {
"prompt": "A photorealistic lighthouse at dusk",
"width": 1024,
"height": 1024,
"strength": 0.8,
"steps": 4,
"shift": 3,
"compression_method": "fp16"
},
"work_units": [],
"outputs": [],
"created_at": "2026-06-08T12:00:00Z",
"updated_at": "2026-06-08T12:00:00Z"
}完成响应
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"workload_type": "bonsai-image-binary-4b",
"status": "COMPLETED",
"job_spec_json": {
"prompt": "A photorealistic lighthouse at dusk",
"width": 1024,
"height": 1024,
"strength": 0.8,
"steps": 4,
"shift": 3,
"compression_method": "fp16"
},
"work_units": [
{
"id": "…",
"index": 0,
"status": "COMPLETED"
}
],
"outputs": [
{
"id": "…",
"output_type": "<output type>",
"filename": "<output filename>",
"size_bytes": 524288,
"download_url": "<presigned output download URL>"
}
],
"created_at": "2026-06-08T12:00:00Z",
"updated_at": "<completion timestamp>"
}输入文字提示词并下载生成的 PNG。Bonsai Image 是免费的在线文生图生成器:紧凑型 1-bit FLUX.2 Klein 4B 模型,只需四步就能把自然语言描述变成图片,在您连接到 MESH 的电脑上不限量运行。原生尺寸为 1024×1024;512×512 为更快的预览。无需负面提示词。