General Introduction
UserAPI.ai is an API service platform for developers focused on connecting Midjourney's image generation capabilities. Users can generate high-quality AI images through simple interface calls without having to directly manipulate Midjourney's complex Discord environment. The platform offers an intuitive dashboard, detailed documentation and 24/7 support for individual developers, startups or large teams. Its core strength is to simplify the image generation process, support multi-account management and unlimited generation, and help users quickly incorporate AI ideas into their products. The website has a clean design, focused functionality and smooth operation, balancing speed and stability.
Function List
- Text to Image: Generate diverse AI images based on text descriptions, supporting multiple styles and detail adjustments.
- Image Optimization: Provides functions such as Upscale and Vary Region to enhance image quality.
- Multi-account management: Supports unified management of multiple Discord accounts for easy switching and scheduling.
- Task Status Query: View the progress of image generation in real time, get task results and download links.
- Webhook Notification: Supports setting callback links to automatically receive task completion notifications.
- Remix Mode: Increase creative flexibility by generating image variants with updated cue words.
- Detailed API Documentation: Provide code examples and parameter descriptions to make integration less difficult.
- Account Rotation: Automatically assigns requests to different accounts to optimize load and efficiency.
Using Help
How to get started
UserAPI.ai is a purely online service platform that can be used without installing software. Below is a detailed guide to help users get started quickly.
- Sign up for an account and get an API key
interviewshttps://userapi.ai/
Click on the "Sign Up" button and enter your email address and password to complete your registration. After successful registration, login to the dashboard (https://dashboard.userapi.ai
), enter the "API Keys" page, the system will automatically generate an API key, such as3fb0b6d9-6e1b-4bb7-993f-f79e9f1717e8
. This key is the core credential for calling the API and needs to be kept safe. Users can generate a new key at any time, but the old key will expire. - Connecting Discord Accounts
UserAPI.ai generates images through Midjourney's Discord server, so it is necessary to associate a valid Discord account and make sure that the account is subscribed to Midjourney's service (Basic or Standard plans are recommended). The procedure is as follows:- Log in to Discord and open the browser developer tool (press F12).
- Send a message in the "Network" tab and find the request containing "messages".
- Copy the value of the "authorization" field in the request header, i.e. the Discord Token.
- Go back to the UserAPI.ai dashboard, click "Add Discord Account", paste the Token and submit.
- The account association is complete when the system validation passes. If you are using multiple Discord accounts, repeat this step to add them.
- Calling the Image Generation API
The most commonly used interfaces are/imagine
, which is used to generate an image based on a textual description. The following is an example of a cURL-based call:curl -X POST https://api.userapi.ai/midjourney/v2/imagine \ -H "Content-Type: application/json" \ -H "api-key: 你的API密钥" \ -d '{ "prompt": "一朵盛开的玫瑰花, 红色, 背景是蓝色天空, 4K, highly detailed" }'
After a successful call, the API returns a task ID (hash) such as cecb48b8-7edd-4c42-b63a-fc6afd755979
. This ID is used to subsequently query the task status or optimize the image.
- Query Task Status
utilization/status
The interface checks the progress of the generation:curl -X GET \ -H "Content-Type: application/json" \ -H "api-key: 你的API密钥" \ "https://api.userapi.ai/midjourney/v2/status?hash=你的任务ID"
When the task state is
done
, the return result contains a download link for the image, such ashttps://cdn.discordapp.com/attachments/example.png
. Typical generation time is a few seconds to a minute, depending on cue word complexity and server load. - Image Optimization and Adjustment
UserAPI.ai supports a variety of optimization features, including zoom and region adjustment:- Upscale: Perform a resolution boost on the generated image by calling the
/upscale
::curl -X POST https://api.userapi.ai/midjourney/v2/upscale \ -H "Content-Type: application/json" \ -H "api-key: 你的API密钥" \ -d '{ "hash": "你的任务ID", "choice": 1 }'
parameters
choice
Used to select one of the four generated images (values 1 through 4). - Regional realignment (Vary Region): To modify specific areas of the image, you need to first call the
/upscale
Then use the/vary-region
interface, specifying the adjustment area and the new cue word.
- Upscale: Perform a resolution boost on the generated image by calling the
- Enable Remix Mode
Remix mode allows image variants to be generated by updating the cue word, increasing creative flexibility. Activation Mode:- invocations
/prefer
interface to enable Remix mode:curl -X POST https://api.userapi.ai/midjourney/v2/prefer \ -H "Content-Type: application/json" \ -H "api-key: 你的API密钥" \ -d '{ "remix": true }'
- Then use
/imagine
interface to submit new cue words to generate variant images.
- invocations
- Setting up Webhook Notifications
To avoid frequent status queries, a Webhook can be set up to receive task results. You can set up a Webhook to receive the results of a task when you call the/imagine
when addingwebhook_url
::curl -X POST https://api.userapi.ai/midjourney/v2/imagine \ -H "Content-Type: application/json" \ -H "api-key: 你的API密钥" \ -d '{ "prompt": "futuristic city at night", "webhook_url": "https://your-server.com/webhook" }'
After the task is completed, the system sends a POST request to the specified URL containing the task ID, status, and image link.
- Multi-account management and rotation
The dashboard supports adding multiple Discord accounts, and the system will automatically rotate accounts to handle requests and optimize load distribution. Users can view and edit the account status on the "Accounts" page to ensure stability in high concurrency scenarios. - View Documentation & Get Support
The official documentation is located athttps://butternut-saffron-e5e.notion.site/Midjourney-userapi-ai-doc
It contains detailed descriptions of all interfaces, parameter lists and code samples. In case of problems, you can contact us through the "Contact Us" section of the dashboard or through the Telegram support channel (https://t.me/userapiai
) Contact the team, response time is usually within 15 minutes.
Featured Function Operation
- Batch Generation: By calling the
/imagine
, batch image generation can be realized. It is recommended to set a request interval of 1 second to avoid triggering frequency limitations. - Image description generation: Upload images to
/describe
interface, the system returns a four-paragraph text description, suitable for scenarios that require inspiration or reverse engineering. - Account Scheduling: The dashboard allows setting account priorities and frequency of use, suitable for enterprise users who require constant high load generation.
- Vary Region Features: Accurately adjust localized areas of an image via APIs, suitable for design scenarios that require fine modifications, such as replacing backgrounds or adjusting object details.
Pricing and restrictions
UserAPI.ai offers a variety of pricing options:
- Complimentary Packages: 50 free API calls for the first time.
- pay as needed: $0.04 per request, no minimum purchase.
- monthly package: $25/month for unlimited calls.
- Quarterly Packages: $67.50/3 months for better value for money.
- Annual Package: $246/year for long-term users.
Free accounts are limited to 10 requests per minute, paid accounts have higher limits, ask the support team for details. All packages offer full functionality with no feature limitations.
caveat
- Discord accounts require a subscription to the Midjourney service (Basic or Standard plans are recommended, avoid Pro or Mega plans to keep costs down).
- The quality of the generated image depends on the cue word. Detailed descriptions such as "4K, vibrant colors, cinematic lighting" are recommended.
- The API does not support direct video generation, only still images.
- Images are copyrighted in accordance with Midjourney's policies and terms need to be confirmed prior to commercial use.
application scenario
- advertising design
Advertising agencies can quickly generate promotional materials through the API. For example, enter "modern coffee shop promotional poster with warm colors" to generate images that match the brand style and save outsourcing design costs. - Social Media Content
Bloggers or marketers can generate social media images in bulk. For example, a description of a "fall forest scene with sunshine falling" can be generated in multiple high-quality images to enhance the appeal of the content. - Game Art Development
Game developers can generate scene concepts or character sketches. For example, type in "cyberpunk city with flashing neon lights" to quickly get inspiration materials to assist in art design. - E-commerce Product Showcase
E-commerce platforms can generate product display images. For example, the description of "white sneakers, simple background", to generate a unified style of images to enhance the visual effect of the product page. - Educational content production
Online education platforms can generate instructional illustrations. For example, enter "map of the planets of the solar system, cartoon style" to generate visual content suitable for students.
QA
- Does Midjourney have an official API?
Midjourney itself does not provide an official API, but UserAPI.ai provides full API access by connecting to its services in a legal way. - What can I do with the free package?
The free package provides 50 API calls and supports all features suitable for test image generation, optimization and task management. - How to improve the quality of generated images?
Use detailed cue words with resolution (e.g., 4K), style (e.g., realistic), and detail descriptions (e.g., vibrant colors). Refer to the cue word guide in the documentation. - What programming languages are supported?
The API is based on the RESTful standard and supports any language that can send HTTP requests, such as Python, JavaScript, Go, and so on. - What if the mission fails?
Check if the API key, Discord Token and Midjourney subscription status is valid. If it still fails, contact the support team with the task ID and get a response within 15 minutes.