Saltar para o conteúdo principal
POST
/
mj
/
submit
/
imagine
Create a Midjourney imagine task
curl --request POST \
  --url https://api.cometapi.com/mj/submit/imagine \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "a paper boat floating on calm water at sunrise --v 6.1"
}
'
{
  "code": 1,
  "description": "提交成功",
  "result": "1773314942177684",
  "properties": {
    "discordChannelId": "5e6ca8e1f40e4de6",
    "discordInstanceId": "5e6ca8e1f40e4de6"
  }
}

Documentation Index

Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt

Use this file to discover all available pages before exploring further.

Use este endpoint para iniciar o fluxo principal do Midjourney. Todas as etapas posteriores, incluindo upscale, variation e custom zoom, começam com uma tarefa imagine bem-sucedida.

O que a primeira resposta fornece

  • result é o id da tarefa que você consultará em seguida
  • code ainda pode ser um código de sucesso mesmo quando não for um 200 no estilo HTTP

Fluxo principal

1

Submit the imagine task

Envie o prompt e armazene o id da tarefa retornado.
2

Poll until the task finishes

Use Fetch Single Task até que a tarefa atinja SUCCESS, MODAL ou FAILURE.
3

Continue with post-processing

Quando os botões aparecerem, use Action para upscale, variation, reroll, zoom e operações de acompanhamento semelhantes.

Padrão opcional de prompt para vídeo

Se você quiser movimento a partir de uma imagem de origem, adicione uma URL de imagem mais flags de vídeo do Midjourney no prompt, como --video e --motion.

Autorizações

Authorization
string
header
obrigatório

Bearer token authentication. Use your CometAPI key.

Corpo

application/json
prompt
string
obrigatório

Text prompt for the generation. Supports standard Midjourney parameters such as --v, --ar, --stylize, etc.

Exemplo:

"a paper boat floating on calm water at sunrise --v 6.1"

botType
enum<string>
padrão:MID_JOURNEY

Bot type to use. MID_JOURNEY for Midjourney (default), NIJI_JOURNEY for Niji.

Opções disponíveis:
MID_JOURNEY,
NIJI_JOURNEY
accountFilter
object

Filter which Midjourney account modes may be used for this task.

base64Array
string[]

Base64-encoded reference images. Each item should be a data URI such as data:image/png;base64,xxx.

state
string

Custom state string. Returned as-is in the task result and webhook callback for your own tracking.

Resposta

200 - application/json

Task accepted.

code
integer
obrigatório
description
string
obrigatório
result
string
obrigatório

Task id returned after submission.

properties
object