Skip to main content

1. Get API KEY

Before calling the API, you need to get TT-API-KEY for identity authentication. Here’s how to get it:

Step 1: Register Your Account

Open the TTAPI Official Website, click SIGN IN in the top right corner, or directly open the TTAPI Dashboard login page and choose to register/login with Github or Google account.
If you choose to register/login with a Google account, you need internet access, otherwise the page will timeout! Currently email registration is not supported
  • After successful registration, you will receive an official TTAPI email notification and be redirected to the Dashboard homepage. A TT-API-KEY will be generated by default, which will be used for authentication in all TTAPI interface authentication
  • You will also receive a default trial quota of 30 quota (≈$0.3), and the current remaining quota will be displayed on the page

Step 2: Use Your Account

We recommend changing your default TT-API-KEY before first use. Click “RESET” on the dashboard homepage, confirm and submit to change your default KEY
If you don’t want to use Github or Google one-click login in the future, you can click “Forgot Password?” on the login page and reset your login password using the verification code sent to your registered email. Later you can login with your account password

2. Set Request Headers

All API requests must include TT-API-KEY in the request header for authentication.
TT-API-KEY: YOUR_API_KEY

3. Send Your First Request

Step 1: Send Generation Request

Below is a simple image generation API call example.
curl --request POST \
  --url https://api.ttapi.io/midjourney/v1/imagine \
  --header 'Content-Type: application/json' \
  --header 'TT-API-KEY: "YOUR_API_KEY"' \
  --data '
{
  "prompt": "A cute kitten",
  "mode": "fast",
  "hookUrl": "<string>"
}
'

Response Example

{
    "status": "SUCCESS",
    "message": "success",
    "data": {
        "jobId": "b8bd3ff0-4349-4b71-8938-5e13aefa64fe"
    }
}

Step 2: Check Task Status

Query the generation result using the task ID (jobId) returned in step 1:
curl -X GET https://api.ttapi.io/midjourney/v1/fetch?jobId={jobId} \
-H "TT-API-KEY: YOUR_API_KEY" \

Response Example

{
    "status": "SUCCESS",
    "message": "",
    "jobId": "8ddd973f-b5ff-4192-b418-b37fb65c65f3",
    "data": {
        "action": "imagine",
        "jobId": "8ddd973f-b5ff-4192-b418-b37fb65c65f3",
        "progress": "100",
        "prompt": "A cute kitten",
        "quota": "2",
        "discordImage": "https://cdn.ttapi.io/midjourney/2025-11-14/20260307_024522_19cf9806e1c7438b.png",
        "cdnImage": "https://cdn.ttapi.io/midjourney/2025-11-14/20260307_024522_19cf9806e1c7438b.png",
        "width": 960,
        "height": 1200,
        "hookUrl": "https://webhook-test.com/40bb50795afa242aee8c837617cd72e9",
        "components": [
            "upsample1","upsample2","upsample3","upsample4","reroll","variation1","variation2","variation3","variation4"
        ],
        "seed": null,
        "images": [
            "https://cdn.ttapi.io/midjourney/20260307/5c7261ec-7271-495d-a0f7-4dd395652a84tl.png",
            "https://cdn.ttapi.io/midjourney/20260307/5c7261ec-7271-495d-a0f7-4dd395652a84tr.png",
            "https://cdn.ttapi.io/midjourney/20260307/5c7261ec-7271-495d-a0f7-4dd395652a84bl.png",
            "https://cdn.ttapi.io/midjourney/20260307/5c7261ec-7271-495d-a0f7-4dd395652a84br.png"
        ]
    }
}

Task Status Explanation

PENDING_QUEUETask is waiting in queue
ON_QUEUETask is being processed
SUCCESSTask completed successfully
FAILEDTask execution failed

Help and Notes

  • If you have questions about product queue limits and usage, please refer to the relevant sections in FAQ
  • For other undocumented questions, please contact technical support
Last modified on March 12, 2026