Saltar al cuntegna

Z Image Base Lora

Integrar

ID dal model z-image/base/lora
# 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/z-image/base/lora?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# 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"

Questa dumonda: $0,012 12 credits API Lantschar sin questa pagina

Obtegna ina clav API
Alibaba · Maletg

Tes emprim resultat vegn qua

Construis ina dumonda sutvart e l'exequescha cun tia clav API. Outputs vegnan copiads en nossa memorisaziun, conservads per adina u 7 dis gratuitamain.

Construir ina dumonda

Ils controls vegnan generads dal schema dal model. Il code e ​​il pretsch s'actualiseschan durant che ti als midas.

•obligatori

Prompt che gida la generaziun dal maletg.

image_size standard landscape_4_3

Dimensiuns dal maletg generà.

num_images standard 1

Dumber da maletgs dumandà per la generaziun.

Avanzà negative_prompt · output_format · acceleration · num_inference_steps · guidance_scale · seed · enable_safety_checker · loras
standard

Prompt negativ utilisà durant la generaziun dal maletg.

output_format standard png

Format da datoteca dal maletg final.

acceleration standard regular

Nivel d'acceleraziun applitgà a l'elavuraziun.

standard 28

Dumber da pass d'inferenzia da manar a fin.

standard 4

Scala da guida applitgada durant la generaziun dal maletg.

Semenza per maletgs reproducibels: in prompt ed ina semenza identics produceschan il medem maletg sch'è la versiun dal model invariada.

standard []

Ponderaziuns LoRA d'applitgar, limitadas a 3 entradas.

POST /run/z-image/base/lora?wait=20 calculaziun → $0,012
# 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/z-image/base/lora?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# 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"

Executar questa dumonda

Tia clav resta en quest browser: ella vegn tramessa mo al Doitong API e memorisada (localStorage) mo sch'ella scheccas Tiar a memoria. Obtegnair ina clav API

Davart Z Image Base Lora

Generaziun text-to-image cun il model Z-Image da basa e LoRAs persunalizadas agiuntadas tras `loras` (maximal 3). `steps` va da 1 a 50 e `guidance_scale` da 1 a 20, cun in prompt negativ disponibel. Produces 1 fin 4 maletgs en jpeg, png u webp en ina da sis grondezzas predefinidas.

Parameters

Invia u il num canonic u il num nativ, betg omaduas. Nums canonics

NumTip StandardPermess Descripziun
promptobligatori
Tipstring
Prompt che gida la generaziun dal maletg.
image_sizeopziunal
Tipobject
Standardlandscape_4_3
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
Dimensiuns dal maletg generà.
num_inference_stepsopziunal
Tipinteger
Standard28
1 – 50
Dumber da pass d'inferenzia da manar a fin.
guidance_scaleopziunal
Tipnumber
Standard4
1 – 20
Scala da guida applitgada durant la generaziun dal maletg.
seedopziunal
Tipinteger | null
Semenza per maletgs reproducibels: in prompt ed ina semenza identics produceschan il medem maletg sch'è la versiun dal model invariada.
num_imagesopziunal num_outputs
Tipinteger
Standard1
1 – 4
Dumber da maletgs dumandà per la generaziun.
enable_safety_checkeropziunal
Tipboolean
Standardtrue
Controlla da segirezza che restituescha maletgs nairs enstagl da maletgs marcads sco privlus. La valur true activa la controlla; false la deactivescha mo per contos autorisads, entant che dumondas senza autorisaziun vegnan controlladas tuttina.
output_formatopziunal
Tipenum
Standardpng
jpegpngwebp
Format da datoteca dal maletg final.
accelerationopziunal
Tipenum
Standardregular
noneregularhigh
Nivel d'acceleraziun applitgà a l'elavuraziun.
negative_promptopziunal
Tipstring
Standard
Prompt negativ utilisà durant la generaziun dal maletg.
lorasopziunal
Tipobject[]
Standard[]
Ponderaziuns LoRA d'applitgar, limitadas a 3 entradas.
loras[].pathobligatori
Tipstring
Lieu dals pais LoRA, inditgà sco URL u ID d’in repositori HuggingFace en il format owner/repo.
loras[].scaleopziunal
Tipnumber
Standard1
0 – 4
Factor da scalaziun applitgà a LoRA, da 0.0 fin 4.0.
obligatori Num canonic, er acceptà

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "z-image/base/lora",
  "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": 12,
    "usd": "0.012",
    "charged": 12,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "output": {
    "images": [
      {
        "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,
        "width": 1024,
        "height": 768
      }
    ],
    "timings": {},
    "seed": 42,
    "has_nsfw_concepts": [
      false
    ],
    "prompt": "string"
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "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"
  }
}
Tias datotecas, tia decisiunMintga outputs[].url è ina copia en nossa memorisaziun: conservada per adina (pajà per GB-mes) u 7 dis gratuitamain, tenor la configuraziun dal conto u ?storage=.
La medema structura per mintga modeltype, url, content_type, width, height e duration, tant per maletgs sco per video e audio. output è l'object da resultat dal model sez.
Champs da l'output
images
array of object {url, content_type, file_name, file_size, width, height}Infurmaziuns da la datoteca per ils maletgs generads.
timings
objectInfurmaziuns davart il temp dal process da generaziun.
seed
integerSeed da la generaziun dal maletg, inclusa la valur tschernida casualmain sche l'input n'ha betg furnì in seed; autramain repeta la valur furnida.
has_nsfw_concepts
array of booleanInditgescha sche concepts NSFW cumparan en ils maletgs generads.
prompt
stringPrompt utilisà durant la generaziun dal maletg.

Dapli models: Text a maletg

Per agents AI: questa pagina sco Markdown è disponibla sut https://doitong.com/rm/developers/models/z-image/base/lora.md. Tut ils models e las guidas: https://doitong.com/developers/llms.txt