Op den Inhalt sprangen

ERNIE-Image Trainer

Integréieren

Modell-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.ru/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.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Dës Ufro: 2,40 $ 2.400 API-Kreditter · ≈ 253,11 ₽ Op dëser Säit ausféieren

API-Schlëssel kréien
Baidu Training #lora#personalization#trainer

Trainéiert eng LoRA fir Ernie Image aus engem ZIP mat beschrëfte Biller

Baidu · Datei

Äin éischt Resultat kënnt hei hin

Baut hei drënner eng Ufro a féiert se mat Ärem API-Schlëssel aus. Output gëtt an eis Späicherung kopéiert, fir ëmmer oder 7 Deeg gratis gespäichert.

Eng Ufro erstellen

D'Kontrolle ginn aus dem Modellschema generéiert. De Code an de Präis aktualiséiere sech, wann s du se ännerst.

•obligatoresch

URL vun engem ZIP-Archiv mat Input-Biller an de passenden Caption-Dateien. Benotzt ROOT.EXT fir Bilddateinimm, wéi 001.jpg, an ROOT.txt fir déi passend Captions, wéi 001.txt. Biller ouni Caption-Textdatei benotzen default_caption.

Standard 2000

Total Unzuel vun Trainingsschrëtt.

Erweidert default_caption · learning_rate

Caption, déi amplaz vu feelende Caption-Dateie benotzt gëtt; None mécht hiert Feelen zu engem Feeler.

Standard 0.0005

Léierquote vum Training.

POST /run/ernie-image-trainer?wait=20 Präis → 2,40 $
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/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.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Dës Ufro ausféieren

Äre Schlëssel bleift an dësem Browser: e gëtt nëmmen un d'Doitong API geschéckt an nëmme gespäichert (localStorage), wann s du „Erënneren“ aktivéiers. En API-Schlëssel kréien

Iwwer ERNIE-Image Trainer

Finetunet eng LoRA aus `images_data_url`, engem ZIP mat Biller an de passenden Caption-Textdateien. `steps` läit tëscht 10 an 40000 (Standard 2000), an `learning_rate` huet de Standardwäert 0.0005. `default_caption` gëtt fir fehlend Caption-Dateien agesat. D'Ausgab besteet aus enger Konfiguratiounsdatei an Diffusers-LoRA-Gewiichter.

Parameteren

NummTyp StandardErlaabt Beschreiwung
images_data_urlobligatoresch
Typstring
URL vun engem ZIP-Archiv mat Input-Biller an de passenden Caption-Dateien. Benotzt ROOT.EXT fir Bilddateinimm, wéi 001.jpg, an ROOT.txt fir déi passend Captions, wéi 001.txt. Biller ouni Caption-Textdatei benotzen default_caption.
stepsoptional
Typinteger
Standard2000
10 – 40.000
Total Unzuel vun Trainingsschrëtt.
default_captionoptional
Typstring | null
Caption, déi amplaz vu feelende Caption-Dateie benotzt gëtt; None mécht hiert Feelen zu engem Feeler.
learning_rateoptional
Typnumber
Standard0.0005
Léierquote vum Training.
obligatoresch

Output

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.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Är Fichieren, Är WielAll outputs[].url ass eng Kopie an eiser Späicherung: fir ëmmer gespäichert (bezuelbar pro GB-Mount) oder 7 Deeg gratis, jee no Ärer Kontastellung oder ?storage=.
D'selwecht Struktur bei all Modelltype, url, content_type, width, height an duration, fir Biller, Video an Audio gläichermoossen. output ass dem Modell säin eegent Resultatobjet.
Output-Felder
diffusers_lora_file
object {url, content_type, file_name, file_size}URL op d'trainéiert LoRA-Gewiichter am diffusers-Format.
config_file
object {url, content_type, file_name, file_size}URL op d'Konfiguratiounsdatei vum trainéierte Modäll.

Fir AI-Agenten: dës Säit als Markdown ass ënner https://doitong.com/lb/developers/models/ernie-image-trainer.md. All Modeller a Guiden: https://doitong.com/developers/llms.txt