PopNowDocs API
Contenuto principale

Riferimento API di P-Image LoRA

Render e modifiche P-Image veloci con una tua LoRA

Con una sola chiave API di PopNow chiami P-Image LoRA 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
Pruna AI
Risultato
Immagine
Da
0.9 crediti per immagine ($0.009)
Tempo tipico
circa 8 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.

Crea immagine

pruna-ai/p-image-lora/text-to-image

Prezzo

OpzioneCrediti (per immagine)Dollari USA
Predefinito0.9$0.009

Parametri

CampoTipoPredefinitoValori ammessiA cosa serve
promptObbligatoriostring—fino a 5000 caratteriDescribe the subject, clothing, place, light and lens in sentences. Put a LoRA trigger word first.
aspect_ratioFacoltativostring1:11:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, customOutput aspect ratio. Pick custom to set width and height yourself.
widthFacoltativointeger—da 256 a 1440Output width in pixels for the custom aspect ratio, 256 to 1440 in steps of 16; 1024 when left out.
heightFacoltativointeger—da 256 a 1440Output height in pixels for the custom aspect ratio, 256 to 1440 in steps of 16; 1024 when left out.
lorasFacoltativoarray<object>[]fino a 1 elementiOne LoRA weight file trained for P-Image text-to-image, with its strength.
output_formatFacoltativostringjpegjpeg, png, webpContainer of the returned image.
seedFacoltativointeger—da 0 a 2147483647Random seed for controlled comparisons.

Richiesta di esempio

Questa richiesta funziona così com’è; i campi omessi usano il valore predefinito. Prima salva la tua chiave in POPNOW_API_KEY.

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": "pruna-ai/p-image-lora/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.

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"

Modifica immagine

pruna-ai/p-image-lora/edit

Prezzo

OpzioneCrediti (per immagine)Dollari USA
Predefinito1.8$0.018

Parametri

CampoTipoPredefinitoValori ammessiA cosa serve
promptObbligatoriostring—fino a 5000 caratteriSay what to change and what to keep. With several images, refer to them as image 1, image 2 and so on.
image_urlsObbligatorioarray<string (uri)>—fino a 5 elementiOne to five source images. Without aspect_ratio the result follows the first one.
aspect_ratioFacoltativostring—1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3Output aspect ratio. Leave it empty to follow the first source image.
lorasFacoltativoarray<object>[]fino a 1 elementiOne LoRA weight file trained for P-Image editing, with its strength.
output_formatFacoltativostringjpegjpeg, png, webpContainer of the returned image.
seedFacoltativointeger—da 0 a 2147483647Random seed for controlled comparisons.

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.

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": "pruna-ai/p-image-lora/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.

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