PopNowDocs API
Contenuto principale

Riferimento API di Object Eraser

Cancella qualsiasi cosa per nome o a pennello, riempita in modo naturale

Con una sola chiave API di PopNow chiami Object Eraser dal tuo codice. Qui trovi gli ID del modello da inviare, ogni campo di input accettato, quanti crediti costa ogni richiesta 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
4.5 crediti per immagine ($0.045)
Tempo tipico
circa 36 s

1 credito = 0,01 $. All’accettazione l’attività trattiene l’importo massimo possibile e alla fine addebita il consumo reale, arrotondato al credito superiore; il resto viene sbloccato. Le attività non riuscite non vengono addebitate. Per conoscere la cifra esatta prima di eseguire, chiama POST /api/v1/jobs/quote.

Cancella oggetto

popnow/object-eraser-v1/edit

Prezzo

OpzioneCrediti (per immagine)Dollari USA
Predefinito4.5$0.045

Parametri

CampoTipoPredefinitoValori ammessiA cosa serve
image_urlObbligatoriostring——Photo to clean up. The selected objects are removed and the space is filled to match the scene.
promptFacoltativostring—fino a 1000 caratteriWhat to remove, in a few plain words with a position when there is more than one, e.g. "the wooden bench on the left". Give this, mask_url, or both.
mask_urlFacoltativostring——Optional black-and-white mask the same size as the photo: white marks what to remove, black what to keep. Give this, prompt, or both.
output_formatFacoltativostringpngpng, jpeg, webpFile format of the returned image.

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?wait=60
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": "popnow/object-eraser-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