Referência da API do Ideogram Character
Um retrato mantém o mesmo rosto e cabelo em cenas novas e edições com máscara
Com uma única chave de API da PopNow você chama o Ideogram Character direto do seu código. Aqui estão os IDs de modelo a enviar, cada campo de entrada aceito, quanto custa cada requisição em USD e um exemplo que você cola no terminal e roda.
As descrições dos parâmetros vêm do schema de entrada do modelo e estão disponíveis só em inglês.
Resumo
- Desenvolvedor
- Ideogram
- Resultado
- Imagem
- A partir de
- $0.08 USD por imagem
- Tempo médio
- cerca de 16 s
Os preços são exibidos em USD e os valores são descontados do seu saldo PopNow. Ao aceitar a tarefa, o valor máximo é reservado; ao concluir, o uso real é cobrado e o restante liberado. Tarefas com falha não são cobradas. Consulte POST /api/v1/jobs/quote para obter uma cotação exata antes de executar.
Criar imagem
ideogram/character/text-to-image
Preço
| Opção | USD |
|---|---|
turbo | $0.08 por imagem |
balanced | $0.12 por imagem |
quality | $0.16 por imagem |
Parâmetros
| Campo | Tipo | Padrão | Valores aceitos | Para que serve |
|---|---|---|---|---|
promptObrigatório | string | — | até 5.000 caracteres | Describe the new scene for the person in the reference photo: setting, outfit, pose, light and camera. |
reference_image_urlsObrigatório | array<string (uri)> | — | até 1 itens | 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 | — | até 5.000 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. |
Exemplo de requisição
Esta requisição roda do jeito que está; os campos que você omitir usam o valor padrão. Antes, coloque sua chave em POPNOW_API_KEY.
O exemplo usa arquivos de amostra da PopNow em reference_image_urls. Troque pelos seus próprios links HTTPS públicos, uploads ou assets salvos.
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"
}
}'A resposta já traz um taskId. Busque o resultado com GET /api/v1/jobs/recordInfo ou inclua callBackUrl para ser avisado.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"Editar imagem
ideogram/character/edit
Preço
| Opção | USD |
|---|---|
turbo | $0.08 por imagem |
balanced | $0.12 por imagem |
quality | $0.16 por imagem |
Parâmetros
| Campo | Tipo | Padrão | Valores aceitos | Para que serve |
|---|---|---|---|---|
promptObrigatório | string | — | até 5.000 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_urlObrigatório | string (uri) | — | — | The picture to work on. JPEG, PNG or WebP, up to 10 MB. |
reference_image_urlsObrigatório | array<string (uri)> | — | até 1 itens | Exactly one clear photo of the person to keep consistent: face visible, nothing covering it. JPEG, PNG or WebP, up to 10 MB. |
mask_urlObrigatório | 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. |
Exemplo de requisição
Esta requisição roda do jeito que está; os campos que você omitir usam o valor padrão. Antes, coloque sua chave em POPNOW_API_KEY.
O exemplo usa arquivos de amostra da PopNow em image_url, mask_url, reference_image_urls. Troque pelos seus próprios links HTTPS públicos, uploads ou assets salvos.
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"
}
}'A resposta já traz um taskId. Busque o resultado com GET /api/v1/jobs/recordInfo ou inclua callBackUrl para ser avisado.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
