Referencia de la API de Ideogram Character
Un retrato mantiene la misma cara y peinado en escenas nuevas y ediciones con máscara
Con una sola clave de API de PopNow puedes llamar a Ideogram Character desde tu propio código. Aquí tienes los ID de modelo que debes enviar, cada campo de entrada que acepta, cuánto cuesta cada solicitud en USD y una petición que puedes pegar tal cual en la terminal.
Las descripciones de los parámetros vienen del esquema de entrada del modelo y solo están en inglés.
De un vistazo
- Creado por
- Ideogram
- Resultado
- Imagen
- Desde
- $0.08 USD por imagen
- Tiempo habitual
- unos 16 s
Los precios se muestran en USD y se cobran de tu saldo de PopNow. Al aceptar la tarea se reserva el importe máximo; al terminar se cobra el uso real y se libera el resto. Las tareas fallidas no se cobran. Consulta POST /api/v1/jobs/quote para obtener un presupuesto exacto antes de ejecutar.
Crear imagen
ideogram/character/text-to-image
Precio
| Opción | USD |
|---|---|
turbo | $0.08 por imagen |
balanced | $0.12 por imagen |
quality | $0.16 por imagen |
Parámetros
| Campo | Tipo | Valor predeterminado | Valores admitidos | Para qué sirve |
|---|---|---|---|---|
promptObligatorio | string | — | hasta 5000 caracteres | Describe the new scene for the person in the reference photo: setting, outfit, pose, light and camera. |
reference_image_urlsObligatorio | array<string (uri)> | — | hasta 1 elementos | Exactly one clear photo of the person to keep consistent: face visible, nothing covering it. JPEG, PNG or WebP, up to 10 MB. |
qualityOpcional | string | balanced | turbo, balanced, quality | Rendering speed tier. turbo is fastest and cheapest, quality is slowest with the most detail. Priced per image. |
styleOpcional | 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_outputsOpcional | integer | 1 | de 1 a 4 | How many images to make in one request, 1 to 4. Each image is billed. |
enable_prompt_expansionOpcional | boolean | true | — | Let Ideogram's MagicPrompt rewrite a short prompt into a fuller description before rendering. On by default. |
negative_promptOpcional | string | — | hasta 5000 caracteres | Things to keep out of the image, as a short list. The main prompt wins where they conflict. |
seedOpcional | integer | — | de 0 a 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. |
Solicitud de ejemplo
Esta solicitud funciona tal cual; los campos que no envíes usan su valor predeterminado. Antes, guarda tu clave en POPNOW_API_KEY.
El ejemplo usa archivos de muestra de PopNow en reference_image_urls. Cámbialos por tus propios enlaces HTTPS públicos, archivos subidos o recursos guardados.
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 respuesta trae un taskId al instante. Consulta el resultado con GET /api/v1/jobs/recordInfo o añade callBackUrl para recibir un aviso.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"Editar imagen
ideogram/character/edit
Precio
| Opción | USD |
|---|---|
turbo | $0.08 por imagen |
balanced | $0.12 por imagen |
quality | $0.16 por imagen |
Parámetros
| Campo | Tipo | Valor predeterminado | Valores admitidos | Para qué sirve |
|---|---|---|---|---|
promptObligatorio | string | — | hasta 5000 caracteres | Describe what fills the black area of the mask: the person, their expression, clothing and light. The rest of the picture is kept. |
image_urlObligatorio | string (uri) | — | — | The picture to work on. JPEG, PNG or WebP, up to 10 MB. |
reference_image_urlsObligatorio | array<string (uri)> | — | hasta 1 elementos | Exactly one clear photo of the person to keep consistent: face visible, nothing covering it. JPEG, PNG or WebP, up to 10 MB. |
mask_urlObligatorio | string (uri) | — | — | Mask with the same proportions as image_url. Black marks the area to repaint with the character; white is kept unchanged. |
qualityOpcional | string | balanced | turbo, balanced, quality | Rendering speed tier. turbo is fastest and cheapest, quality is slowest with the most detail. Priced per image. |
styleOpcional | 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_outputsOpcional | integer | 1 | de 1 a 4 | How many images to make in one request, 1 to 4. Each image is billed. |
enable_prompt_expansionOpcional | boolean | true | — | Let Ideogram's MagicPrompt rewrite a short prompt into a fuller description before rendering. On by default. |
seedOpcional | integer | — | de 0 a 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. |
Solicitud de ejemplo
Esta solicitud funciona tal cual; los campos que no envíes usan su valor predeterminado. Antes, guarda tu clave en POPNOW_API_KEY.
El ejemplo usa archivos de muestra de PopNow en image_url, mask_url, reference_image_urls. Cámbialos por tus propios enlaces HTTPS públicos, archivos subidos o recursos guardados.
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 respuesta trae un taskId al instante. Consulta el resultado con GET /api/v1/jobs/recordInfo o añade callBackUrl para recibir un aviso.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
