PopNowDocs API
Contenuto principale

Riferimento API di P-H3-Image LoRA

Immagini e modifiche P-H3-Image con fino a tre LoRA H3

Con una sola chiave API di PopNow chiami P-H3-Image LoRA 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
Pruna AI
Risultato
Immagine
Da
$0.042 USD per immagine
Tempo tipico
circa 33 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

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

Prezzo

OpzioneUSD
1k$0.042 per immagine
1.5k$0.054 per immagine
2k$0.066 per immagine
3k$0.114 per immagine
4k$0.162 per immagine

Parametri

CampoTipoPredefinitoValori ammessiA cosa serve
promptObbligatoriostring—fino a 5000 caratteriDescribe the subject, the place and the light in plain sentences. Put a LoRA's trigger word first.
aspect_ratioFacoltativostring1:11:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9, 9:21, 2:1, 1:2, 3:1, 1:3, 5:4, … (+1)Output aspect ratio.
resolutionFacoltativostring1k1k, 1.5k, 2k, 3k, 4kOutput size tier: 1k is about 1 megapixel, 1.5k about 2.4, 2k about 4, 3k about 9.4, 4k about 16.8.
lorasFacoltativoarray<object>[]fino a 3 elementiUp to three LoRA files trained for MiniMax H3, each with its own strength. Use a direct file link.
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-h3-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",
    "resolution": "1k"
  }
}'

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-h3-image-lora/edit

Prezzo

OpzioneUSD
1k$0.048 per immagine
1.5k$0.066 per immagine
2k$0.084 per immagine
3k$0.156 per immagine
4k$0.228 per immagine

Parametri

CampoTipoPredefinitoValori ammessiA cosa serve
promptObbligatoriostring—fino a 5000 caratteriSay what to change. Refer to the images as <Picture 1>, <Picture 2> and so on; Picture 1 is the one being edited. Put a LoRA's trigger word first.
image_urlsObbligatorioarray<string (uri)>—fino a 9 elementiOne to nine images. The first is edited; the rest are references. Each one after the first raises the quote.
aspect_ratioFacoltativostring—1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9, 9:21, 2:1, 1:2, 3:1, 1:3, 5:4, … (+1)Output aspect ratio. Leave it unset to follow the first image.
resolutionFacoltativostring1k1k, 1.5k, 2k, 3k, 4kOutput size tier: 1k is about 1 megapixel, 1.5k about 2.4, 2k about 4, 3k about 9.4, 4k about 16.8.
lorasFacoltativoarray<object>[]fino a 3 elementiUp to three LoRA files trained for MiniMax H3, each with its own strength. Use a direct file link.
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
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": "pruna-ai/p-h3-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"
    ],
    "resolution": "1k"
  }
}'

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