This walkthrough uses Midjourney text-to-image as the example: sign up → get a Token → call the API → read the result.Documentation Index
Fetch the complete documentation index at: https://docs.xhuoapi.ai/llms.txt
Use this file to discover all available pages before exploring further.
1. Sign up and grab credit
- Register at platform.xhuoapi.ai
- Open the Midjourney service detail page and purchase a package or claim a trial
- On the Credentials tab, click Create and copy the returned Token
2. Make the request
Export your Token:3. Parse the response
/midjourney/imagine waits for generation to finish before returning (~tens of seconds), so the body already contains the result:
image_urlis the 4-quadrant grid image — display or download it directlyactionslists follow-up operations you can run on this image (upscale, variations)task_idis used for follow-up calls (upscale / variation)
success field:
4. Async: long video / long music
Heavier video and music endpoints typically return only atask_id and deliver the result via polling or webhook. See Async task model.
5. Where to go next
API reference
Interactive docs for every endpoint
Gateway & auth
Tokens, endpoints, error codes
Pricing overview
Billing model for each category
MCP integration
Call from Claude / Cursor directly

