Riferimento API di Seedream 4.0
Dimensioni esatte fino a 4096×2304 e modifiche con dieci riferimenti
Con una sola chiave API di PopNow chiami Seedream 4.0 dal tuo codice. Qui trovi gli ID del modello da inviare, ogni campo di input accettato, quanto costa ogni richiesta in USD e una richiesta da incollare nel terminale così com’è.
Le descrizioni dei parametri provengono dallo schema di input del modello e sono disponibili solo in inglese.
In sintesi
- Sviluppato da
- ByteDance
- Risultato
- Immagine
- Da
- $0.031 USD per immagine
- Tempo tipico
- circa 37 s
I prezzi sono indicati in USD e gli importi vengono addebitati sul tuo saldo PopNow. Alla ricezione viene riservato il massimo importo; al termine viene addebitato il consumo effettivo e il resto viene sbloccato. Le attività fallite non vengono addebitate. Per un preventivo esatto prima di eseguire, usa POST /api/v1/jobs/quote.
Crea immagine
bytedance/seedream-4.0/text-to-image
Prezzo
| Opzione | USD |
|---|---|
Predefinito | $0.031 per immagine |
Parametri
| Campo | Tipo | Predefinito | Valori ammessi | A cosa serve |
|---|---|---|---|---|
promptObbligatorio | string | — | — | Describe the image to generate: subject, composition, style, and lighting. |
sizeFacoltativo | string | 2048*2048 | 2048*2048, 1024*1024, 2304*1728, 1728*2304, 2848*1600, 1600*2848, 2496*1664, 1664*2496, 3136*1344, 3072*3072, 3456*2592, 2592*3456, 4096*2304, 2304*4096, … (+2) | Output image size in pixels, written as width*height. |
Richiesta di esempio
Questa richiesta funziona così com’è; i campi omessi usano il valore predefinito. Prima salva la tua chiave in POPNOW_API_KEY.
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "bytedance/seedream-4.0/text-to-image",
"input": {
"prompt": "A cozy reading nook beside a rain-streaked window, warm lamp light, a sleeping orange cat on a knitted blanket, soft film grain"
}
}'La risposta contiene subito un taskId. Recupera il risultato con GET /api/v1/jobs/recordInfo, oppure aggiungi callBackUrl per ricevere una notifica.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"Modifica immagine
bytedance/seedream-4.0/edit
Prezzo
| Opzione | USD |
|---|---|
Predefinito | $0.031 per immagine |
Parametri
| Campo | Tipo | Predefinito | Valori ammessi | A cosa serve |
|---|---|---|---|---|
promptObbligatorio | string | — | — | Describe the image to produce from the source: subject, composition, style, and lighting. |
image_urlsObbligatorio | array<string (uri)> | — | fino a 10 elementi | Source images that you are authorised to process. |
sizeFacoltativo | string | 2048*2048 | 2048*2048, 1024*1024, 2304*1728, 1728*2304, 2848*1600, 1600*2848, 2496*1664, 1664*2496, 3136*1344, 3072*3072, 3456*2592, 2592*3456, 4096*2304, 2304*4096, … (+2) | Output image size in pixels, written as width*height. |
Richiesta di esempio
Questa richiesta funziona così com’è; i campi omessi usano il valore predefinito. Prima salva la tua chiave in POPNOW_API_KEY.
L’esempio usa file di prova di PopNow in image_urls. Sostituiscili con i tuoi link HTTPS pubblici, file caricati o asset salvati.
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask?wait=60" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "bytedance/seedream-4.0/edit",
"input": {
"prompt": "Change the orange jacket to deep forest green and add soft golden-hour light; keep the face, pose and background unchanged",
"image_urls": [
"https://media.popnow.ai/influencer/examples/marco.webp"
]
}
}'La risposta contiene subito un taskId. Recupera il risultato con GET /api/v1/jobs/recordInfo, oppure aggiungi callBackUrl per ricevere una notifica.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
