PopNowDocs API
Contenuto principale

Riferimento API di Object Extractor

Ritaglia solo l’oggetto che descrivi, in PNG trasparente

Con una sola chiave API di PopNow chiami Object Extractor 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
PopNow
Risultato
Immagine
Da
$0.024 USD per immagine

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.

Estrattore di oggetti

popnow/object-extractor-v1/edit

Prezzo

OpzioneUSD
Predefinito$0.024 per immagine

Parametri

CampoTipoPredefinitoValori ammessiA cosa serve
image_urlObbligatoriostring——The photo that contains the object to cut out. Without autocrop the transparent PNG keeps this photo's size.
promptObbligatoriostring—fino a 500 caratteriShort description of the one object to keep, for example "the red car" or "the woman in the cream sweater". Required: without it nothing is cut out.
refine_edgesFacoltativobooleanfalse—Run an extra background-removal pass that cleans leftover background pixels and edge transparency.
autocropFacoltativobooleanfalse—Trim the transparent canvas tightly around the object instead of keeping the full photo size.

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_url. Sostituiscili con i tuoi link HTTPS pubblici, file caricati o asset salvati.

POST /api/v1/jobs/createTask
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": "popnow/object-extractor-v1/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_url": "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.

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Passi successivi

In questa pagina