Seedream 图片
Seedream 5.5
Seedream 5.5 的请求参数、扣费和示例
POST
/
api
/
v1
/
task
/
submit
Seedream 5.5
curl --request POST \
--url https://api.example.com/api/v1/task/submit \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/task/submit"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/task/submit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/task/submit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/task/submit"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/task/submit")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/task/submit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body使用 MaxAPI 的 API 密钥提交图片生成或编辑任务。每个请求生成 1 张图。
输出图与参考图分别计费,第一张参考图也计入总价。合计后保留小数积分。比如 2K 输出加 1 张参考图扣 3.956 积分。
提交成功后用返回的
| 字段 | 取值 |
|---|---|
model | seedream-5-5 |
input.prompt | 必填 |
input.imageUrls | 可公开访问的 HTTP(S) 参考图 URL,最多 10 张 |
input.resolution | 1k、1.5k 或 2k,默认 2k |
input.ratio | 1:1、4:3、3:4、16:9、9:16、3:2、2:3 或 21:9 |
input.n | 固定为 1,可省略 |
input.output_format | png 或 jpeg,默认 png |
input.background | auto、transparent 或 opaque。透明背景须使用 PNG |
input.watermark | 可选,布尔值 |
input.nsfw_check | 可省略或传 false |
input.optimize_prompt_options | 可选,仅接受 {"mode":"standard"} |
| 计费项 | 售价 | 积分 |
|---|---|---|
| 1K / 1.5K 输出 | $0.0184/张 | 1.84/张 |
| 2K 输出 | $0.0322/张 | 3.22/张 |
| 参考图 | $0.00736/张 | 0.736/张 |
{
"model": "seedream-5-5",
"input": {
"prompt": "一杯放在浅色桌面上的陶瓷咖啡杯,暖色自然光",
"resolution": "2k",
"ratio": "1:1"
}
}
data.taskId 查询状态,或设置 Webhook。确认失败(包括内容审核未通过)会全额退款。提交超时请先查任务状态。⌘I
Seedream 5.5
curl --request POST \
--url https://api.example.com/api/v1/task/submit \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/task/submit"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/task/submit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/task/submit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/task/submit"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/task/submit")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/task/submit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body