Sakuranbo AI · 视频
根据文本或图像生成 2 至 30 秒、1080p、2K 或 4K 的带音频视频。
- 文生视频
- 图生视频
- 参考图生视频
- 2-30 秒
- 1080p / 2K / 4K
- 6 种宽高比
- 含音频
每秒起 $0.225
默认设置一次运行:$1.125(5 秒,1080p)
最高 2K 分辨率的高保真文生图,以及基于参考图的图像编辑。
Sakuranbo AI ·
将在控制台中打开 Playground。
Sakuranbo AI 目前处于预览阶段。
CherryImage 1.0 Pro 可根据最多 5,000 字符的提示词生成图像,并使用 1 到 10 张参考图编辑图像。可选择 1K、1.5K 或 2K 输出及宽高比,按分辨率以每张计价。
sakuranbo/cherryimage-1.0-pro使用模型 ID sakuranbo/cherryimage-1.0-pro 调用该模型。
POST /v1/estimate 接收 JSON 请求体({ model, input }),在运行前返回该输入的价格。该端点无需 API 密钥。
curl -X POST "https://api.sakuranbo.ai/v1/estimate" \
-H "Content-Type: application/json" \
-d '{
"model": "sakuranbo/cherryimage-1.0-pro",
"input": {
"prompt": "A matte ceramic coffee mug on a walnut desk, soft morning light, shallow depth of field",
"resolution": "2k",
"aspect_ratio": "4:3"
}
}'const response = await fetch("https://api.sakuranbo.ai/v1/estimate", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "sakuranbo/cherryimage-1.0-pro",
"input": {
"prompt": "A matte ceramic coffee mug on a walnut desk, soft morning light, shallow depth of field",
"resolution": "2k",
"aspect_ratio": "4:3"
}
}),
});
const data = await response.json();
console.log(data);import requests
response = requests.post(
"https://api.sakuranbo.ai/v1/estimate",
json={
"model": "sakuranbo/cherryimage-1.0-pro",
"input": {
"prompt": "A matte ceramic coffee mug on a walnut desk, soft morning light, shallow depth of field",
"resolution": "2k",
"aspect_ratio": "4:3",
},
},
)
print(response.json())向 /v1/images/generations 发送生成请求。下方请求使用了该模型在目录中的示例输入。
列出和获取模型以及费用预估无需 API 密钥。生成请求需要 API 密钥:Authorization: Bearer YOUR_API_KEY
curl -X POST "https://api.sakuranbo.ai/v1/images/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $SAKURANBO_API_KEY" \
-d '{
"model": "sakuranbo/cherryimage-1.0-pro",
"prompt": "A matte ceramic coffee mug on a walnut desk, soft morning light, shallow depth of field",
"resolution": "2k",
"aspect_ratio": "4:3"
}'const response = await fetch("https://api.sakuranbo.ai/v1/images/generations", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.SAKURANBO_API_KEY}`,
},
body: JSON.stringify({
"model": "sakuranbo/cherryimage-1.0-pro",
"prompt": "A matte ceramic coffee mug on a walnut desk, soft morning light, shallow depth of field",
"resolution": "2k",
"aspect_ratio": "4:3"
}),
});
const data = await response.json();
console.log(data);import os
import requests
response = requests.post(
"https://api.sakuranbo.ai/v1/images/generations",
headers={
"Authorization": f"Bearer {os.environ['SAKURANBO_API_KEY']}",
},
json={
"model": "sakuranbo/cherryimage-1.0-pro",
"prompt": "A matte ceramic coffee mug on a walnut desk, soft morning light, shallow depth of field",
"resolution": "2k",
"aspect_ratio": "4:3",
},
)
print(response.json())该模型的请求字段。
| 名称 | 类型 | 必填 | 默认值 | 约束 | 说明 |
|---|---|---|---|---|---|
prompt | string | 是 | 最多 5,000 个字符 | 要生成的图像或要应用的编辑的文字描述。 | |
images | url[] | 否 | 最多 10 项 | 用于编辑的参考图(1 到 10 张)。在 /v1/images/edits 中为必填。 | |
resolution | enum | 否 | 2k | 可选值:1k, 1.5k, 2k | 输出分辨率,决定每张图片的价格。 |
n | integer | 否 | 1 | 1 至 100 | 要生成的图像数量(1 到 100)。价格为每张图片的价格乘以该值。 |
aspect_ratio | enum | 否 | auto | 可选值:auto, 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 21:9 | 输出图像的宽高比。 |
output_format | enum | 否 | jpeg | 可选值:jpeg, png | 图像文件格式。 |
价格以 USD 计价,已包含我们的加价。失败、已取消、已过期以及被内容政策拒绝的运行不会计费。对于对话,模型开始生成输出(包括推理输出)后,即使流中断或连接被关闭,也会对已生成的输出计费。
| 项目 | 单位 | 条件 | 价格 |
|---|---|---|---|
| 输出图像 | 每张 | resolution: 1k | $0.045 |
| 输出图像 | 每张 | resolution: 1.5k | $0.05 |
| 输出图像 | 每张 | resolution: 2k | $0.09 |
示例按标价计算。最终费用由服务器根据实际用量计算。
| 示例 | 合计 |
|---|---|
| 1 张 1K 图像 | $0.045 |
| 1 张 1.5K 图像 | $0.05 |
| 1 张 2K 图像 | $0.09 |
| 100 张 2K 图像 | $9.00 |
默认设置一次运行:$0.09(1 张,2K)
输入字段的 JSON Schema,由目录生成。
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"prompt": {
"type": "string",
"maxLength": 5000,
"description": "要生成的图像或要应用的编辑的文字描述。"
},
"images": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
},
"maxItems": 10,
"description": "用于编辑的参考图(1 到 10 张)。在 /v1/images/edits 中为必填。"
},
"resolution": {
"type": "string",
"enum": [
"1k",
"1.5k",
"2k"
],
"default": "2k",
"description": "输出分辨率,决定每张图片的价格。"
},
"n": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 1,
"description": "要生成的图像数量(1 到 100)。价格为每张图片的价格乘以该值。"
},
"aspect_ratio": {
"type": "string",
"enum": [
"auto",
"1:1",
"4:3",
"3:4",
"16:9",
"9:16",
"3:2",
"2:3",
"21:9"
],
"default": "auto",
"description": "输出图像的宽高比。"
},
"output_format": {
"type": "string",
"enum": [
"jpeg",
"png"
],
"default": "jpeg",
"description": "图像文件格式。"
}
},
"required": [
"prompt"
]
}