注册

Replicate Seedream 4 功能

POST https://api.quickrouter.ai/replicate/v1/models/bytedance/seedream-4/predictions 在线调试 →
Authorization

在 Header 添加参数 Authorization,其值为 Bearer 之后拼接 Token

示例: Authorization: Bearer ********************

请求参数

Header 参数
Authorization string
可选
示例: Bearer {{YOUR_API_KEY}}
Content-Type string
可选
示例: application/json
Body 参数 application/json
input object
可选
模型输入参数
示例
{
    "input": {
        "size": "2K",
        "width": 2048,
        "height": 2048,
        "prompt": "a photo of a store front called i"sedream 4", it sells books, a poster in the window says i"sedream 4 now on Replicate!"",
        "max_images": 2,
        "image_input": [],
        "aspect_ratio": "4:3",
        "sequential_image_generation": "auto"
    }
}

请求示例代码

curl --location --request POST 'https://api.quickrouter.ai/replicate/v1/models/bytedance/seedream-4/predictions' --header 'Authorization: Bearer YOUR_API_KEY' --header 'Content-Type: application/json' --data-raw '{
    "input": {
        "size": "2K",
        "width": 2048,
        "height": 2048,
        "prompt": "a photo of a store front called i"sedream 4", it sells books, a poster in the window says i"sedream 4 now on Replicate!"",
        "max_images": 2,
        "image_input": [],
        "aspect_ratio": "4:3",
        "sequential_image_generation": "auto"
    }
}'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer YOUR_API_KEY");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "input": {
    "size": "2K",
    "width": 2048,
    "height": 2048,
    "prompt": "a photo of a store front called i"sedream 4", it sells books, a poster in the window says i"sedream 4 now on Replicate!"",
    "max_images": 2,
    "image_input": [],
    "aspect_ratio": "4:3",
    "sequential_image_generation": "auto"
  }
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api.quickrouter.ai/replicate/v1/models/bytedance/seedream-4/predictions", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import http.client
import json

conn = http.client.HTTPSConnection("api.quickrouter.ai")
payload = json.dumps({
  "input": {
    "size": "2K",
    "width": 2048,
    "height": 2048,
    "prompt": "a photo of a store front called i"sedream 4", it sells books, a poster in the window says i"sedream 4 now on Replicate!"",
    "max_images": 2,
    "image_input": [],
    "aspect_ratio": "4:3",
    "sequential_image_generation": "auto"
  }
})
headers = {
  'Authorization': 'Bearer YOUR_API_KEY',
  'Content-Type': 'application/json'
}
conn.request("POST", "/replicate/v1/models/bytedance/seedream-4/predictions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

返回响应

响应参数 application/json
id string
可选
任务ID
status string
可选
任务状态
output string
可选
任务输出
示例
{
    "id": "26t3agjpx9rme0crb4es5cbxx4",
    "status": "starting"
}