- AI image generation
- task query
- train model
- image tool
- Flux text2imagePOST
- Single Face Swap V1.0POST
- Single Face Swap V2.0POST
- instantIDPOST
- Face restorationPOST
- Super ResolutionPOST
- image descriptionPOST
- Multiple Face SwapPOST
- Face DetectionPOST
- Prompt expansionPOST
- Hairstyle changerPOST
- Object RemovalPOST
- Style recognitionPOST
- OutpaintingPOST
- CNT previewPOST
- background removePOST
- image enlargePOST
- image watermarkPOST
Submit training task
POST
/AIGCImgOpenServ/saas/modelTraining/submitTraining/Job
img
Request
Header Params
X-Request-req-accessKeyId
string
optional
X-Request-req-accessKeySecret
string
optional
Body Params application/json
taskId
string
required
fileUrlList
array[string]
required
maxEpochs
integer
optional
batchSize
integer
optional
learningRate
string
optional
maxTokenLength
integer
optional
clipSkip
integer
optional
randomCrop
boolean
optional
pretrainedModel
string
optional
repeats
integer
optional
mixedPrecision
string
optional
savePrecision
string
optional
numCpuThreadsPerProcess
integer
optional
seed
integer
optional
cacheLatents
boolean
optional
cacheLatentsToDisk
boolean
optional
lrScheduler
string
optional
lrWarmupSteps
integer
optional
optimizerType
string
optional
resolution
integer
optional
enableBucket
boolean
optional
minBucketReso
integer
optional
maxBucketReso
integer
optional
textEncoderLr
string
optional
unetLr
string
optional
networkDropout
number
optional
rankDropout
number
optional
moduleDropout
number
optional
networkModule
string
optional
networkDim
integer
optional
networkAlpha
integer
optional
networkArgs
string
optional
v2
boolean
optional
flipAug
boolean
optional
colorAug
boolean
optional
gradientAccumulationSteps
integer
optional
noiseOffset
number
optional
Example
{
"file_url_list": [],
"max_epochs": 20,
"batch_size": 2,
"learning_rate": "0.0001",
"max_token_length": 225,
"clip_skip": 2,
"random_crop": 0,
"repeats": 10,
"mixedPrecision": "bf16",
"savePrecision": "bf16",
"numCpuThreadsPerProcess": 4,
"seed": 1234,
"cacheLatents": true,
"cacheLatentsToDisk": false,
"lrScheduler": "constant",
"lrWarmupSteps": 0,
"optimizerType": "Lion",
"resolution": 384,
"enableBucket": true,
"minBucketReso": 256,
"maxBucketReso": 2048,
"textEncoderLr": "5e-05",
"unetLr": "0.0001",
"networkDropout": 0,
"rankDropout": 0,
"moduleDropout": 0,
"networkModule": "networks.lora",
"networkDim": 128,
"networkAlpha": 128,
"networkArgs": "",
"v2": false,
"flipAug": false,
"colorAug": false,
"noiseOffset": 0.05,
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.zhiqite.com/AIGCImgOpenServ/saas/modelTraining/submitTraining/Job' \
--header 'X-Request-req-accessKeyId;' \
--header 'X-Request-req-accessKeySecret;' \
--header 'Content-Type: application/json' \
--data-raw '{
"file_url_list": [],
"max_epochs": 20,
"batch_size": 2,
"learning_rate": "0.0001",
"max_token_length": 225,
"clip_skip": 2,
"random_crop": 0,
"repeats": 10,
"mixedPrecision": "bf16",
"savePrecision": "bf16",
"numCpuThreadsPerProcess": 4,
"seed": 1234,
"cacheLatents": true,
"cacheLatentsToDisk": false,
"lrScheduler": "constant",
"lrWarmupSteps": 0,
"optimizerType": "Lion",
"resolution": 384,
"enableBucket": true,
"minBucketReso": 256,
"maxBucketReso": 2048,
"textEncoderLr": "5e-05",
"unetLr": "0.0001",
"networkDropout": 0,
"rankDropout": 0,
"moduleDropout": 0,
"networkModule": "networks.lora",
"networkDim": 128,
"networkAlpha": 128,
"networkArgs": "",
"v2": false,
"flipAug": false,
"colorAug": false,
"noiseOffset": 0.05,
}'
Responses
🟢200OK
application/json
Body
code
string
required
msg
string
required
Example
{
"code": "string",
"msg": "string"
}
Modified at 2024-08-08 12:04:01