שפּרינגען צו אינהאַלט

ERNIE-Image Trainer

אינטעגרירן

מאָדעל־id ernie-image-trainer
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/ernie-image-trainer?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "images_data_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

דער דאָזיקער ריקוועסט: ⁨$ 2.40⁩ 2,400 API־קרעדיטן לויפֿן עס אויף דער דאָזיקער בלאַט

באַקומען אַן API שליסל
Baidu טרענירונג #lora#personalization#trainer

טרענירט אַ LoRA פֿאַר Ernie Image פֿון אַ zip מיט באַשריבענע בילדער

Baidu · טעקע

דאָ קומט אײַער ערשטער רעזולטאַט

בויט אונטן אַ בקשה און לויפט זי מיט אײַער API שליסל. רעזולטאַטן ווערן קאַפּירט צו אונדזער סטאָרידזש, געהאַלטן אויף אייביק אָדער 7 טעג אומזיסט.

בויען אַ בעטן

קאָנטראָלן ווערן דזשענערירט פֿון דעם מאָדעל־סכעמע. דער קאָד און דער פּרײַז דערהײַנטיקן זיך ווען איר ענדערט זיי.

•פארלאנגט

URL פֿון אַ ZIP אַרכיוו מיט אַרײַנגעבונג־בילדער צוזאַמען מיט קעפּל־פֿײַלן. ניצט ROOT.EXT פֿאַר בילד־נעמען, למשל 001.jpg, און ROOT.txt פֿאַר די צופּאַסנדיקע קעפּלעך, למשל 001.txt. בילדער אָן אַ קעפּל־טעקסט־פֿײַל ניצן default_caption.

סטאַנדאַרט 2000

גאַנץ צאָל טריינינג־שריט.

פֿאָרגעשריטן default_caption · learning_rate

קעפּל וואָס ווערט גענוצט אַנשטאָט פֿון פֿעלנדיקע קעפּל־פֿײַלן; None מאַכט זייער אַוועקזײַן פֿאַר אַ טעות.

סטאַנדאַרט 0.0005

טריינינג־לערנראַטע.

POST /run/ernie-image-trainer?wait=20 פּרײַז → ⁨$ 2.40⁩
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/ernie-image-trainer?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "images_data_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

לויפֿן דעם ריקוועסט

אײַער key בלײַבט אין דעם בלעטערער: זי ווערט געשיקט נאָר צום Doitong API און אָפּגעהיט (localStorage) נאָר אויב איר טיקט אָן געדענקען. באַקומען אַן API שליסל

וועגן ERNIE-Image Trainer

פֿײַנשטעלט אַ LoRA פֿון `images_data_url`, אַ ZIP פֿון בילדער מיט צופּאַסנדיקע אונטערשריפֿט־טעקסט־פֿײַלן. `steps` גייט פֿון 10 ביז 40000 (סטאַנדאַרט 2000), און `learning_rate` איז סטאַנדאַרט 0.0005. `default_caption` פֿילט אויס פעלנדיקע אונטערשריפֿט־פֿײַלן. די רעזולטאַטן זענען אַ קאָנפֿיגוראַציע־פֿײַל און דיפיוזערס־LoRA־געוויכטן.

פּאַראַמעטערס

נאָמעןטיפּ סטאַנדאַרטערלויבט באַשרײַבונג
images_data_urlפארלאנגט
טיפּstring
URL פֿון אַ ZIP אַרכיוו מיט אַרײַנגעבונג־בילדער צוזאַמען מיט קעפּל־פֿײַלן. ניצט ROOT.EXT פֿאַר בילד־נעמען, למשל 001.jpg, און ROOT.txt פֿאַר די צופּאַסנדיקע קעפּלעך, למשל 001.txt. בילדער אָן אַ קעפּל־טעקסט־פֿײַל ניצן default_caption.
stepsאָפּציאָנעל
טיפּinteger
סטאַנדאַרט2000
10 – 40,000
גאַנץ צאָל טריינינג־שריט.
default_captionאָפּציאָנעל
טיפּstring | null
קעפּל וואָס ווערט גענוצט אַנשטאָט פֿון פֿעלנדיקע קעפּל־פֿײַלן; None מאַכט זייער אַוועקזײַן פֿאַר אַ טעות.
learning_rateאָפּציאָנעל
טיפּnumber
סטאַנדאַרט0.0005
טריינינג־לערנראַטע.
פארלאנגט

אויסגאַבע

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "ernie-image-trainer",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 2400,
    "usd": "2.40",
    "charged": 2400,
    "refunded": 0
  },
  "input": {
    "images_data_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  },
  "output": {
    "diffusers_lora_file": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_name": "0-output.jpeg",
      "file_size": 1843200
    },
    "config_file": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_name": "0-output.jpeg",
      "file_size": 1843200
    }
  },
  "outputs": [
    {
      "type": "file",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
אייער טעקעס, אייער ברירהיעדער outputs[].url איז אַ קאַפּיע אין אונדזער סטאָרידזש: געהאַלטן אויף אייביק (באַצאָלט פּער GB־חודש) אָדער 7 טעג אומזיסט, לויט אײַער חשבון־באַשטעטיקונג אָדער ?storage=.
דער זעלבער פֿאָרעם בײַ יעדן מאָדעלtype, url, content_type, width, height און duration, סײַ פֿאַר בילדער, ווידעאָ און אַודיאָ. output איז דער אייגענער רעזולטאַט־אָביעקט פֿון מאָדעל.
פֿעלדער פֿון דער אויסגאַבע
diffusers_lora_file
object {url, content_type, file_name, file_size}URL צו די טריינירטע LoRA־וואָגונגען אין diffusers פֿאָרמאַט.
config_file
object {url, content_type, file_name, file_size}URL צו דער קאָנפֿיגוראַציע־פֿײַל פֿון דעם טריינירטן מאָדעל.

פֿאַר AI־אַגענטן: דער בלאַט ווי Markdown געפֿינט זיך בײַ https://doitong.com/yi/developers/models/ernie-image-trainer.md. אַלע מאָדעלן און גוידעס: https://doitong.com/developers/llms.txt