Skip to content

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 Parameter Format Description Supplement
Aspect Ratio --aspect or --ar
  1. Only integer ratios are supported, such as139:100 instead of1.39:1
  2. Different model versions may support aspect ratios to different degrees
  1. Extreme aspect ratios (such as 1:10 or 10:1) are experimental features, and their effects may be unstable
  2. During high-definition processing, some aspect ratios may be fine-tuned for optimization.
The default aspect ratio is 1:1
Chaos --chaos 或 --c is used to adjust the degree of randomness in the image generation process, directly affecting the diversity performance of the generated results.
Value range: 0-100
  • Chaos Value: 0
  • Generated Quantity: 4 Images
  • Generation Feature: Generate images with a unified style based on the prompt
Character Reference --cref Character reference allows you to recreate a specific character across multiple images. None
Role Weight --cw Used in conjunction with character references to specify the weight of the character in the generated image None
Negative Prompt --no is used to specify elements or features that need to be excluded when generating an image. This parameter is implemented through a negative weighting mechanism, equivalent to setting a weight value of -0.5 for the specified elements.
  • Exclude specific objects: such as --no fruits, trees
  • Avoid specific styles: such as --no cartoons, abstractions
  • Control image features: such as --no shadows, highlights
Personalization --profile 或 --p Create custom image styles using personalized profiles and mood boards None
Quality --quality 或 --q Use quality parameters to control image details and processing time In version v7, the quality parameters have been optimized:
  1. Default Optimization: The v7 model uses --q 1 by default, providing better hand coherence while reducing GPU time consumption
  2. Historical Mode: If you need to use the pre-optimization v7 model, you can add--q 2
  3. Experimental Mode: Use --q 4 to try a new generation mode, which may result in better detail performance
Repeat --repeat 或 --r The repeat parameter allows users to generate multiple image variants through a single prompt request. This feature is particularly suitable for:
  • When multiple creative solutions need to be obtained from the same prompt
  • When conducting comparative tests on image style or details
  • When generating similar but unique images in batches
None
Seed --seed Seed parameters are used to set the initial random state for image generation, similar to the random number seed in Computer Graphics. By specifying the same seed value, similar initial generation results can be obtained under the same prompt. None
Stop --stop The stop parameter is used to prematurely terminate rendering during the image generation process, allowing users to obtain different visual effects by controlling the completion level of generation. This parameter is similar to the pause function in video playback, enabling users to freeze the image generation process at specific stages. Default Value: 100 (Fully Generated)
Value Range: 1-100 (Integer)
Original Mode --raw Use the original mode to gain more control over the image None
Stylization --stylize 或 --s Use stylization parameters to control the artistic style in the image Stylization parameters are used to adjust the balance between realism and artistry in image generation:
  • Low value (0-250): More faithful to the prompt, generating realistic-style images
  • Median (250-750) : Balancing realism and artistry, suitable for most scenarios
  • High value (750-1000): Enhance artistic expressiveness and generate more creative images
Default value: 100
Style Reference --sref Style reference is a method that captures the visual atmosphere of an existing image and applies it to your new creation. It does not copy objects or figures, but only the overall style—such as color, medium, texture, or lighting—to help you achieve a consistent visual theme.
Style Weight --sw Style Weight Parameter --sw allows you to control the degree to which the style of the reference image influences the new image. You can set this parameter to any value between 0 and 1000, with the default value being --sw 100 .
Style Version --sv
Used in conjunction with sref to specify the version of the style --sv 1 Original style reference algorithm, more "atmospheric" --sv 2 Second iteration of style reference --sv 3 --sv 1 Updated version, more "atmospheric" --sv 4 --sv 2 Updated version
Tile --tile The tiling parameter is used to generate images that can be seamlessly repeated, making it particularly suitable for creating repeating patterns and textures. This parameter ensures that the edges of the image can be perfectly matched through a special algorithm, achieving seamless connection in both horizontal and vertical directions.
Model Version --version 或 --v Explore and switch model versions using version parameters
Sketch --draft Generate sketch images in V7 with half the GPU cost This feature is only compatible with version 7
Weird --weird or --w Use weird parameters to make your images strange and unconventional
  • 10-300: Slightly strange, maintaining basic recognizability
  • 300-1000: Obvious non-traditional elements and combinations
  • 1000-3000: Extreme Surreal and Abstract Effects
Image Weight --iw Control the influence of image prompts
  • v6* Default value: 1; Weight range: 0-3
  • v5* Default value: 1; Weight range: 0-2
  • v4* Default value: -; Weight range: -
  • Niji 6 Default value: 1; Weight range: 0-3
  • Niji 5 Default value: 1; Weight range: 0-2
Fast Mode --fast Switch your GPU speed to fast mode
Slow Mode --relax Switch your GPU speed to slow mode
Turbo Mode --turbo Switch your GPU speed to extreme mode
Niji --niji Use our model focused on anime and Oriental aesthetics
Enumeration {} Generate multiple prompts in batches and generate images
Experimental Parameters --exp Control the aesthetic effects of image generation
Stealth/Public Mode --stealth/--public Not currently supported
Repeat Parameter --repeat Not currently supported
Batch Quantity --bs 或 --batchsize Only supports video tasks
Dynamic Mode --motion Control the speed of video dynamics (only supports video tasks)
Universal Reference --oref Use the object in the image (upgrade of cref)
Universal Reference Weight --ow Specifies the reference weight of the object in the image generation task, used together with oref
Video end frame --end For video tasks only
Video Loop --loop For video tasks only
Other video-related parameters - -

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

{basePath}/{endpointPath}/tob/diffusion

Request header

Parameters Description Example
Authorization The AK (Access Key) created in the console.
AccessKey
Bearer ${AccessKey}
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/eljciTfuqTxBSjXl/tob/diffusion \
  --header 'Authorization: Bearer ${AccessKey}' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "text": "一辆炫酷的赛车,在山路上飞驰"
  }'

Response

{
  "audits": [],
  "comment": "执行中",
  "id": "67a99aa1f674346b1d1c010f",
  "seed": 0,
  "status": 1,
  "text": "一辆炫酷的赛车,在山路上飞驰",
  "urls": []
}

Region Redraw

Request method

POST

Request path

{basePath}/{endpointPath}/tob/inpaint

Request header

Parameters Description Example
Authorization The AK (Access Key) created in the console.
AccessKey
Bearer ${AccessKey}
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/eljciTfuqTxBSjXl/tob/inpaint' \
--header 'Authorization: Bearer ${AccessKey}' \
--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": "执行中",
  "id": "67a99bbff674346b1d1c015c",
  "seed": 0,
  "status": 1,
  "text": "一辆炫酷的赛车,在山路上飞驰",
  "urls": []
}

High definition

Request method

POST

Request path

{basePath}/{endpointPath}/tob/upscale

Request header

Parameters Description Example
Authorization The AK (Access Key) created in the console.
AccessKey
Bearer ${AccessKey}
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/eljciTfuqTxBSjXl/tob/upscale' \
--header 'Authorization: Bearer ${AccessKey}' \
--header 'content-type: application/json' \
--header 'Accept: */*' \
--data-raw '{
  "imageNo": 0,
  "jobId": "67a99bbff674346b1d1c015c",
  "type": 1
}'

Response

{
  "audits": [],
  "comment": "执行中",
  "id": "67a9ae7cfc0b6392b58e4ff6",
  "seed": 0,
  "status": 1,
  "text": "一辆炫酷的赛车,在山路上飞驰",
  "urls": []
}

Query task information.

Request method

GET

Request path

{basePath}/{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/eljciTfuqTxBSjXl/tob/job/67a99aa1f674346b1d1c010f' \
--header 'Authorization: Bearer ${AccessKey}' \
--header 'content-type: application/json' \

Response

{
  "audits": ["approved"],
  "comment": "成功",
  "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"
}'