MaaS-MJ
Common Information
| Parameter | Description | Example |
|---|---|---|
| basePath | The base path for calling the mass API, includes the fixed path/v1/ai | https://genaiapi.cloudsway.net/v1/ai |
| endpointPath | A randomly generated path segment for calling the mass API | |
| AccessKey | The access key for calling the mass API | RWxxxxxxxx0Gd |
| taskId | The task ID for asynchronous image processing tasks | 1234abcd |
Parameter List
| parameter | Value Range | default value | Description |
|---|---|---|---|
--ar |
ratio of positive integers | 1:1 | aspect ratio |
--raw |
— | — | Raw mode, no default MJ beautification applied |
--hd |
— | — | Native 2K High-Definition Rendering |
--chaos |
0-100 | 0 | Result Diversity |
--seed |
0-4294967295 | random | random seed |
--stylize |
0-1000 | 100 | Art Style Strength |
--quality |
v8.1: {1, 4} v8.2: {1, 2, 3, 4} |
1 | Image detail level. 4corresponds to high-quality mode. |
--iw |
0-3 | 1 | Image Prompt Weight (see the "Image Prompt" document for details) |
--no |
Text | — | Negative Prompt |
--sref |
URL (max. 20) | — | Style Reference |
--sw |
0-1000 | 100 | Style Reference Weight |
--sv |
6 | 6 | Style Algorithm Version (6 is the only supported version) |
--exp |
0-100 | 0 | Experimental parameters to enhance the dynamic feel of the footage |
--personalize |
— | — | Personalized Configuration |
--draft |
— | — | Under the v8 series, 24 images are generated in one batch, and the billing rule is consistent with that of standard image generation tasks (no 50% discount is applicable) |
--fast |
— | — | Fast Mode (Default) |
--turbo |
❌ | — | Instant mode not supported (2x fee) |
--weird |
0-3000 | 0 | introduce surreal elements |
--tile |
— | — | Seamless tiled pattern |
Currently does not support repeat, personalize, {} arrangement prompts, public/stealth.
Create raw image task
The raw image task is completed asynchronously.
Request method
POST
Request path
https://genaiapi.cloudsway.net/v1/ai//{endpointPath}/tob/diffusion
Request header
| Parameters | Description | Example |
|---|---|---|
| Authorization | The AK (Access Key) created in the console. AccessKey Bearer ${YOUR_AK} |
Bearer RWxxxxxxxx0Gd |
Request body
| Field Name | Type | Required | Description | Example |
|---|---|---|---|---|
| text | string | Yes | Text Information, Length [1-8192] | A beautiful and youthful... |
Response value
| Field Name | Type | Required | Description | Example |
|---|---|---|---|---|
| audits | Array of strings | Image review results, empty indicates approval | ["approved"] | |
| comment | string | Task status detailed description. | Task completed successfully. | |
| id | string | Job ID | 3374b3b0-d069-4831-a76b-ebab4df14457 | |
| seed | integer | Seed value | 123456 | |
| status | integer | Task status Default:"0" Enum: 0: Newly created 1:In progress 2:Successfully completed 3:Failed |
0 | |
| text | string | Text,length[1-8192] | A beautiful and youthful... | |
| urls | Array of strings | Image URL or empty | ["http://example.com/image1.jpg"] |
Example
Request
curl --request POST \
--url https://genaiapi.cloudsway.net/v1/ai/{Your endpoint}/tob/diffusion \
--header 'Authorization: Bearer ${YOUR_AK} ' \
--header 'Content-Type: application/json' \
--data-raw '{
"text": "A cool racing car speeding on a mountain road"
}'
Response
{
"audits": [],
"comment": "In progress",
"id": "67a99aa1f674346b1d1c010f",
"seed": 0,
"status": 1,
"text": "A cool racing car speeding on a mountain road",
"urls": []
}
Region Redraw
Request method
POST
Request path
https://genaiapi.cloudsway.net/v1/ai//{endpointPath}/tob/inpaint
Request header
| Parameters | Description | Example |
|---|---|---|
| Authorization | The AK (Access Key) created in the console. AccessKey Bearer ${YOUR_AK} |
Bearer RWxxxxxxxx0Gd |
Request body
| Field Name | Type | Required | Description | Example |
|---|---|---|---|---|
| imageNo | int | Yes | image number(0/1/2/3) | 0 |
| jobId | string | Yes | job ID | 1234567890 |
| mask | object | Yes | Lightweight region mask, supports multiple region redraws. | {...} |
| remixPrompt | string | No | Redraw keyword prompt, length[1-8192] | A new artistic style |
area
| Field Name | Type | Required | Description | Example |
|---|---|---|---|---|
| height | int | Yes | Image pixel height(500-4096) | 1024 |
| points | Array | Yes | Polygon region coordinates | [169,673,561,687,607,847,186,847] |
| width | int | Yes | Image pixel width(500-4096) | 1024 |
Response value
| Field Name | Type | Required | Description | Example |
|---|---|---|---|---|
| audits | Array of strings | Image review results | ||
| comment | string | Task status detailed description | In progress | |
| id | string | Job ID | 3374b3b0-d069-4831-a76b-ebab4df14457 | |
| seed | integer | Seed value | 123456 | |
| status | integer | Task status Default:"0" Enum: 0: Newly created 1:In progress 2:Successfully completed 3:Failed |
0 | |
| text | string | Text | A beautiful and youthful... | |
| urls | Array of strings | Image URL or empty | ["http://example.com/image1.jpg"] |
Example
Request
curl --request POST 'https://genaiapi.cloudsway.net/v1/ai/{Your endpoint}/tob/inpaint' \
--header 'Authorization: Bearer ${YOUR_AK} ' \
--header 'content-type: application/json' \
--header 'Accept: */*' \
--data-raw '{
"imageNo": 0,
"jobId": "67a96a41fc0b6392b58e4285",
"mask": {
"areas": [
{
"height": 500,
"points": [
169,673,561,687,607,847,186,847
],
"width": 500
}
]
}
}''
Response
{
"audits": [],
"comment": "In progress",
"id": "67a99bbff674346b1d1c015c",
"seed": 0,
"status": 1,
"text": "A cool racing car speeding on a mountain road",
"urls": []
}
High definition
Request method
POST
Request path
https://genaiapi.cloudsway.net/v1/ai//{endpointPath}/tob/upscale
Request header
| Parameters | Description | Example |
|---|---|---|
| Authorization | The AK (Access Key) created in the console. AccessKey Bearer ${YOUR_AK} |
Bearer RWxxxxxxxx0Gd |
Request body
| Field Name | Type | Required | Description | Example |
|---|---|---|---|---|
| imageNo | int | Yes | Image number(0/1/2/3) | 0 |
| jobId | string | Yes | Job ID | 1234567890 |
| type | int | Yes | HD Type | 0 |
type Parameters
- Default: "0"
- Enum: "0" "1"
- 0: v6/niji6/v6.1/v7 subtle HD
- 1: v6/niji6/v6.1/v7 creative HD
Response value
| Field Name | Type | Required | Description | Example |
|---|---|---|---|---|
| audits | Array of strings | Image review results | ||
| comment | string | Task status detailed description | In progress | |
| id | string | Job ID | 3374b3b0-d069-4831-a76b-ebab4df14457 | |
| seed | integer | Seed value | 123456 | |
| status | integer | Task status Default:"0" Enum: 0: Newly created 1:In progress 2:Successfully completed 3:Failed |
0 | |
| text | string | Text | A beautiful and youthful... | |
| urls | Array of strings | Image URL or empty | ["http://example.com/image1.jpg"] |
Example
Request
curl --request POST 'https://genaiapi.cloudsway.net/v1/ai/{Your endpoint}/tob/upscale' \
--header 'Authorization: Bearer ${YOUR_AK} ' \
--header 'content-type: application/json' \
--header 'Accept: */*' \
--data-raw '{
"imageNo": 0,
"jobId": "67a99bbff674346b1d1c015c",
"type": 1
}'
Response
{
"audits": [],
"comment": "In progress",
"id": "67a9ae7cfc0b6392b58e4ff6",
"seed": 0,
"status": 1,
"text": "A cool racing car speeding on a mountain road",
"urls": []
}
Variation
Request URL
Request Parameters
| field | Type | Required | Description |
|---|---|---|---|
| jobId | string | Yes | Original Task ID |
| imageNo | integer | Yes | Original image number, with a value range of 0 to 3 |
| type | integer | Yes | Degree of change: 0 = slight change, 1 = intense change |
| remixPrompt | string | No | Refine the prompt to adjust the direction based on the existing changes |
Request Example
curl 'https://genaiapi-m2.cloudsway.net/v1/ai/{endpointPath}/tob/variation' \
-H 'Authorization: Bearer {Your AK}' \
-H 'Content-Type: application/json' \
-d '{
"jobId": "6a13efcec6b99f3fdfec4914",
"imageNo": 1,
"type": 0,
"remixPrompt": "Make the hat blue"
}'
Query task information.
Request method
GET
Request path
https://genaiapi.cloudsway.net/v1/ai//{endpointPath}/tob/job/{jobId}
Path parameters
| Parameters | Type | Required | Description |
|---|---|---|---|
| jobId | string | Yes | Job ID |
Response Value
| Field Name | Type | Description |
|---|---|---|
| audits | Array of strings | Image review results;corresponds to the index in the URLs array, empty indicates approval. |
| comment | string | Task status detailed description |
| id | string | Job ID |
| seed | integer | Seed value |
| status | integer | Task status |
| text | string | Text,length[1-8192] |
| urls | Array of strings | Image URL array, a single empty URL indicates disapproval. |
status Parameters
- 0: Task creation
- 1: In progress
- 2: Successfully completed
- 3: Failed
Example
Request
curl --request GET 'https://genaiapi.cloudsway.net/v1/ai/{Your endpoint}/tob/job/67a99aa1f674346b1d1c010f' \
--header 'Authorization: Bearer ${YOUR_AK} ' \
--header 'content-type: application/json' \
Response
{
"audits": ["approved"],
"comment": "Success",
"id": "3374b3b0-d069-4831-a76b-ebab4df14457",
"seed": 123456,
"status": 2,
"text": "A beautiful and youthful high school girl is sitting in the classroom, with a bright smile on her face.",
"urls": ["http://example.com/image1.jpg"]
}
Path parameters
| Parameters | parameter format | Description |
|---|---|---|
| Model Version | --version or -v |
Use the version parameter to explore and switch between different model versions of MidJourney |
| Draft | --draft |
Generate draft images at half the GPU cost in Version 7 |
| Fast Mode | --fast |
Switch your GPU speed to Fast mode |
| Turbo Mode | --turbo |
Switch your GPU speed to Turbo mode |
Example
Request
curl 'https://genaiapi.cloudsway.net/v1/ai/{{endpointPath}}/tob/diffusion' \
-H 'Authorization: Bearer {Your AK}' \
-H 'Content-Type: application/json' \
-d '{
"text": "A beautiful and youthful high school girl is sitting in the classroom, with a bright smile on her face. --v 7 --aspect 2:1 --draft --turbo"
}'
Appendix (Comparison of Image Generation Model Parameters)
| Parameter | v6* | niji 6 | niji 7 | v7 | v8.1 |
|---|---|---|---|---|---|
| Original Mode | raw | raw | raw | raw | raw |
| Tile | ✅ | ✅ | ❌ | ✅ | ❌ |
| Chaos | 0-100 | 0-100 | 0-100 | 0-100 | 0-100 |
| Seed | 0-4294967295 | 0-4294967295 | 0-4294967295 | 0-4294967295 | 0-4294967295 |
| Stop | 10-100 | 10-100 | ❌ | ❌ | ❌ |
| weird | 0-3000 | 0-3000 | 0-3000 | 0-3000 | ❌ |
| Stylization | 0-1000 | 0-1000 | 0-1000 | 0-1000 | 0-1000 |
| Quality | (0.5, 1, 2) | (0.5, 1, 2) | ❌ | (1, 2, 4) | (1, 4) |
| High resolution | ❌ | ❌ | ❌ | ❌ | ✅ |
| Fast Mode | ✅ | ✅ | ✅ | ✅ | ✅ |
| Turbo Mode | ✅ | ✅ | ✅ | ✅ | ❌ |
| Slow Mode | ❌ | ❌ | ❌ | ❌ | ❌ |
| Image Prompt | ✅ | ✅ | ✅ | ✅ | ✅ |
| Image Weight | 0-3 | 0-3 | 0-2 | 0-3 | 0-3 |
| Negative Prompt | >= 6.1 support | ❌ | ❌ | ✅ | ❌ |
| Style Reference | ✅ | ✅ | ✅ | ✅ | ✅ |
| Character Reference | ✅ | ✅ | ❌ | ❌ | ❌ |
| Role Weight | 0-100 | 0-100 | ❌ | ❌ | ❌ |
| Style Version | (1, 2, 3, 4) | (1, 2, 3, 4) | (1, 2, 3, 4) | (1, 2, 3, 4, 5, 6) | (6) |
| Style Weight | 0-1000 | 0-1000 | 0-1000 | 0-1000 | 0-1000 |
| Repeat Parameter | ❌ | ❌ | ❌ | ❌ | ❌ |
| Sketch | ❌ | ❌ | ❌ | ✅ | ❌ |
| Universal Reference | ❌ | ❌ | ❌ | ✅ | ❌ |
| Universal Reference Weight | ❌ | ❌ | ❌ | 1-1000 | ❌ |
| Experimental Parameters | ❌ | ❌ | ❌ | 0-100 | 0-100 |
| Personalization | ✅ | ❌ | ✅ | ✅ | ✅ |