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 Only integer ratios are supported, such as 139:100 instead of 1.39:1. Different model versions may support aspect ratios to different degrees. Extreme aspect ratios (such as 1:10 or 10:1) are experimental features, and their effects may be unstable. 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 during the image generation process, directly affecting the diversity performance of the generated results. Value range: 0-100 Chaos Value: 0 Generation 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. Role reference is incompatible with v7
Role Weight --cw Used in conjunction with role references to specify the weight of the character in the generated image This feature is compatible with v7. The instructions and settings remain accurate, but the random style code produces different styles compared to V6.1
Negative Prompt --no is used to specify the 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: e.g., --no fruits, trees; Avoid specific styles: e.g., --no cartoon, abstract; Control image features: e.g., --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: Default optimization: The v7 model uses --q 1 by default, providing better hand coherence while reducing GPU time consumption. Historical mode: If you need to use the pre-optimization v7 model, you can add --q 2. Experimental mode: Use --q 4 to try the new generation mode, which may achieve better detail performance.
Repeat --repeat 或 --r The repeat parameter allows users to generate multiple image variations through a single prompt request. This feature is particularly useful when: obtaining multiple creative solutions from the same prompt, conducting comparative testing of image styles or details, and batch generating similar but unique images. None
Seed --seed The seed parameter is 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 a specific stage. Default value: 100 (fully generated) Range of values: 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; Medium value (250-750): Balancing realism and artistry, suitable for most scenarios; High value (750-1000): Enhancing artistic expression, generating 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 The 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 -- Updated version of sv 1, more "atmospheric" --sv 4 -- Updated version of sv 2
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 strange parameters to make your images weird 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-3v5* Default value: 1; Weight range: 0-2v4* Default value: -; Weight range: -Niji 6 Default value: 1; Weight range: 0-3Niji 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 Currently not supported
Turbo Mode --turbo Switch your GPU speed to the ultra-fast mode
  • The V8 / V8.1 model does not support the turbo mode : When using --turbo, the request will be rejected during the parameter validation phase. Please use --fast instead or do not specify the speed
Niji --niji Use our model focused on anime and Oriental aesthetics
Enumeration {} Batch generate multiple prompts and generate images
Experimental Parameters --exp Control the aesthetic effects of image generation
  • Value Range: 0-100, default value is 0
  • Functional Features: Similar to the --stylize parameter but can be used in combination, capable of generating more detailed, dynamic, creative, and richly tone-mapped images
  • Effect Changes: As the parameter value increases, the accuracy of the prompt and the diversity of the image will decrease
Stealth/Public Mode --stealth/--public Currently not supported
Repeat Parameter --repeat Currently not supported
All Things Reference --oref Use the object in the image (upgrade of cref)
Universal Reference Weight --ow Specify the reference weight of the object in the image generation task, used together with oref

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/{Your endpoint}/tob/diffusion \
  --header 'Authorization: Bearer ${AccessKey}' \
  --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

{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/{Your endpoint}/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": "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

{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/{Your endpoint}/tob/upscale' \
--header 'Authorization: Bearer ${AccessKey}' \
--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": []
}

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/{Your endpoint}/tob/job/67a99aa1f674346b1d1c010f' \
--header 'Authorization: Bearer ${AccessKey}' \
--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