POST/v1/imagine

Generate Images

Submit a text prompt to Midjourney and receive a task ID. The image generation runs asynchronously — use the /v1/fetch endpoint to check the status and retrieve the result.

Request Body

promptrequired
string
The text prompt for Midjourney. Supports all MJ parameters (--ar, --v, --style, etc.)
webhook_url
string
Optional URL to receive a POST callback when the task completes or fails.

Example Request

cURL
curl -X POST https://linkrapi.com/api/v1/imagine \
  -H "Authorization: Bearer lkr_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "a futuristic city at sunset, cinematic lighting --ar 16:9",
    "webhook_url": "https://your-server.com/webhook"
  }'

Response

200 OK
{
  "status": "SUCCESS",
  "task_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "message": "Task submitted successfully"
}
status
string
"SUCCESS" if the task was submitted.
task_id
string
Unique task identifier. Use this with /v1/fetch to get results.
message
string
Human-readable status message.

Advanced: Image Prompting

🎨 Using Reference Images (Image Prompts)
LinkrAPI fully supports Midjourney's native image prompting, with integrated anti-bot protection to keep your Discord tokens completely safe.

How to use: Place a direct URL to an image (.png, .jpg, .webp) at the very beginning of your prompt, followed by a space and your text description.

{"prompt": "https://example.com/photo.jpg a cyberpunk city, neon lights --ar 16:9"}

Status Codes

200Task submitted successfully.
400Invalid request — prompt is empty or missing.
401Invalid or missing API key.
403Hold account is suspended.
502Failed to connect to Discord. Check your Discord token.
💡 Typical Workflow
1. Call POST /v1/imagine → get task_id
2. Poll GET /v1/fetch/{task_id} every 5-10 seconds
3. When status is completed, get the image_url
4. Optionally, use POST /v1/action to upscale or create variations
⚠️ Notes
• Image generation typically takes 30–120 seconds depending on Midjourney load.
• All standard Midjourney prompt parameters are supported (--ar, --v, --style, --chaos, etc.).
• If you provide a webhook_url, we'll POST the result to it when the task completes — no need to poll.