PopNowDocs API
Contenu principal

Référence API de Object Eraser

Efface n’importe quoi par son nom ou au pinceau, comblé naturellement

Une seule clé API PopNow suffit pour appeler Object Eraser depuis votre code. Vous trouverez ici les identifiants de modèle à envoyer, chaque champ d’entrée accepté, le coût d’une requête en crédits et une requête à coller telle quelle dans un terminal.

Les descriptions des paramètres proviennent du schéma d’entrée du modèle et ne sont disponibles qu’en anglais.

En bref

Éditeur
PopNow
Résultat
Image
À partir de
4.5 crédits par image ($0.045)
Durée habituelle
environ 36 s
Identifiants de modèle

1 crédit = 0,01 $. À l’acceptation, une tâche réserve le montant maximal possible, puis facture la consommation réelle à la fin, arrondie au crédit supérieur ; le reste est libéré. Une tâche en échec n’est pas facturée. Pour connaître le montant exact avant de lancer, appelez POST /api/v1/jobs/quote.

Effacer un objet

popnow/object-eraser-v1/edit

Prix

OptionCrédits (par image)Dollars US
Par défaut4.5$0.045

Paramètres

ChampTypeValeur par défautValeurs admisesRôle
image_urlObligatoirestring——Photo to clean up. The selected objects are removed and the space is filled to match the scene.
promptFacultatifstring—jusqu’à 1 000 caractèresWhat 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_urlFacultatifstring——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_formatFacultatifstringpngpng, jpeg, webpFile format of the returned image.

Exemple de requête

Cette requête fonctionne telle quelle ; les champs omis gardent leur valeur par défaut. Placez d’abord votre clé dans POPNOW_API_KEY.

L’exemple utilise des fichiers d’exemple PopNow dans image_url. Remplacez-les par vos propres liens HTTPS publics, fichiers envoyés ou ressources enregistrées.

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 réponse contient tout de suite un taskId. Récupérez le résultat avec GET /api/v1/jobs/recordInfo, ou ajoutez callBackUrl pour être prévenu.

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"

Pour aller plus loin

Sur cette page