POST
/v1/imagineGenerate Images
Submit a text prompt to Midjourney or Google NanoBanana and receive a task ID. The image generation runs asynchronously — use the /v1/fetch endpoint to check the status and retrieve the result.
💡 Using Google NanoBanana: To route image requests to the NanoBanana model, you must use your Global NanoBanana API Key in the Authorization header. You can find, generate, and copy this key in the Settings page.
Request Body
promptrequiredstring
The text prompt for Midjourney. Supports all MJ parameters (--ar, --v, --style, etc.)
reference_imagestring
Optional URL of an image to use as a style/content reference. Allowed formats: JPG, JPEG, PNG, WebP.
webhook_urlstring
Optional URL to receive a POST callback when the task completes or fails.
Content Policy
🚫 Prompt Validation
Certain prompts are rejected before being sent to Midjourney and return
HTTP 400:{
"detail": "Your prompt contains a term that violates Midjourney's
content policy. Please rephrase and try again."
}This check runs before any Discord API call is made. Prompts are normalized (Unicode NFKD) and checked against a word-boundary blocklist.
Example Request
Response
statusstring
"SUCCESS" if the task was submitted.
task_idstring
Unique task identifier. Use this with /v1/fetch to get results.
messagestring
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 (
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.
402Insufficient credits — NanoBanana generation requires 4 credits (Single) or 16 credits (Grid).
403Hold account is suspended.
502Failed to connect to Discord. Check your Discord token.
💡 Typical Workflow
1. Call
2. Poll
3. When status is
4. Optionally, use
POST /v1/imagine → get task_id2. Poll
GET /v1/fetch/{task_id} every 5-10 seconds3. When status is
completed, get the image_url4. Optionally, use
POST /v1/action to upscale or create variationsError Handling
⚠️ Midjourney Rejections
If a task returns
• Inactive subscription — the Discord account's MJ subscription has expired
• Banned keyword — the prompt triggered Midjourney's content filter
• Account suspension — the Discord account was banned or restricted
Your client should read the
status: "failed" with a clear error message, it means Midjourney rejected the request. Common reasons include:• Inactive subscription — the Discord account's MJ subscription has expired
• Banned keyword — the prompt triggered Midjourney's content filter
• Account suspension — the Discord account was banned or restricted
Your client should read the
error field from the /v1/fetch response and surface it to the end user.⚠️ 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.
• 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.