Référence API de Ideogram Character
Un portrait garde le même visage et la même coiffure dans de nouvelles scènes et retouches masquées
Une seule clé API PopNow suffit pour appeler Ideogram Character 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 USD 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
- Ideogram
- Résultat
- Image
- À partir de
- $0.08 USD par image
- Durée habituelle
- environ 16 s
- Identifiants de modèle
Les prix sont affichés en USD et les frais sont déduits de votre solde PopNow. Le montant maximal est réservé à la réception de la tâche, puis la consommation réelle est facturée à la fin et le solde libéré. Les tâches en échec ne sont pas facturées. Obtenez un devis exact avant de lancer avec POST /api/v1/jobs/quote.
Créer une image
ideogram/character/text-to-image
Prix
| Option | USD |
|---|---|
turbo | $0.08 par image |
balanced | $0.12 par image |
quality | $0.16 par image |
Paramètres
| Champ | Type | Valeur par défaut | Valeurs admises | Rôle |
|---|---|---|---|---|
promptObligatoire | string | — | jusqu’à 5 000 caractères | Describe the new scene for the person in the reference photo: setting, outfit, pose, light and camera. |
reference_image_urlsObligatoire | array<string (uri)> | — | jusqu’à 1 éléments | Exactly one clear photo of the person to keep consistent: face visible, nothing covering it. JPEG, PNG or WebP, up to 10 MB. |
qualityFacultatif | string | balanced | turbo, balanced, quality | Rendering speed tier. turbo is fastest and cheapest, quality is slowest with the most detail. Priced per image. |
styleFacultatif | string | auto | auto, realistic, fiction | Look of the result: auto lets the model decide, realistic aims for photography, fiction for illustration and stylised art. |
num_outputsFacultatif | integer | 1 | de 1 à 4 | How many images to make in one request, 1 to 4. Each image is billed. |
enable_prompt_expansionFacultatif | boolean | true | — | Let Ideogram's MagicPrompt rewrite a short prompt into a fuller description before rendering. On by default. |
negative_promptFacultatif | string | — | jusqu’à 5 000 caractères | Things to keep out of the image, as a short list. The main prompt wins where they conflict. |
seedFacultatif | integer | — | de 0 à 2147483647 | Optional random seed. Reusing it keeps the same starting noise so one change at a time is easier to compare; results are not guaranteed to match exactly. |
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 reference_image_urls. Remplacez-les par vos propres liens HTTPS publics, fichiers envoyés ou ressources enregistrées.
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": "ideogram/character/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",
"reference_image_urls": [
"https://media.popnow.ai/influencer/examples/ava.webp"
],
"num_outputs": 1,
"quality": "balanced"
}
}'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.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"Modifier une image
ideogram/character/edit
Prix
| Option | USD |
|---|---|
turbo | $0.08 par image |
balanced | $0.12 par image |
quality | $0.16 par image |
Paramètres
| Champ | Type | Valeur par défaut | Valeurs admises | Rôle |
|---|---|---|---|---|
promptObligatoire | string | — | jusqu’à 5 000 caractères | Describe what fills the black area of the mask: the person, their expression, clothing and light. The rest of the picture is kept. |
image_urlObligatoire | string (uri) | — | — | The picture to work on. JPEG, PNG or WebP, up to 10 MB. |
reference_image_urlsObligatoire | array<string (uri)> | — | jusqu’à 1 éléments | Exactly one clear photo of the person to keep consistent: face visible, nothing covering it. JPEG, PNG or WebP, up to 10 MB. |
mask_urlObligatoire | string (uri) | — | — | Mask with the same proportions as image_url. Black marks the area to repaint with the character; white is kept unchanged. |
qualityFacultatif | string | balanced | turbo, balanced, quality | Rendering speed tier. turbo is fastest and cheapest, quality is slowest with the most detail. Priced per image. |
styleFacultatif | string | auto | auto, realistic, fiction | Look of the result: auto lets the model decide, realistic aims for photography, fiction for illustration and stylised art. |
num_outputsFacultatif | integer | 1 | de 1 à 4 | How many images to make in one request, 1 to 4. Each image is billed. |
enable_prompt_expansionFacultatif | boolean | true | — | Let Ideogram's MagicPrompt rewrite a short prompt into a fuller description before rendering. On by default. |
seedFacultatif | integer | — | de 0 à 2147483647 | Optional random seed. Reusing it keeps the same starting noise so one change at a time is easier to compare; results are not guaranteed to match exactly. |
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, mask_url, reference_image_urls. Remplacez-les par vos propres liens HTTPS publics, fichiers envoyés ou ressources enregistrées.
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": "ideogram/character/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",
"mask_url": "https://media.popnow.ai/influencer/examples/marco.webp",
"reference_image_urls": [
"https://media.popnow.ai/influencer/examples/ava.webp"
],
"num_outputs": 1,
"quality": "balanced"
}
}'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.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
