Lumaktaw sa nilalaman

CodeFormer

I-integrate

ID ng modelo codeformer
# 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/codeformer?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "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"

Mga file na katulad ng halimbawa: $0.009 9 kredito ng API sinusukat ang iyong mga file bago patakbuhin Patakbuhin ito sa page na ito

Kumuha ng API key
Open model Pag-edit ng Larawan #image-restoration#faces#utility

Modelo para sa restoration ng mukha na nagkukumpuni ng malabo o distorted na mga portrait, na may opsyonal na face alignment at pag-upscale

Open model · Larawan

Dito mapupunta ang iyong unang resulta

Bumuo ng kahilingan sa ibaba at patakbuhin ito gamit ang iyong API key. Kinokopya ang mga output sa aming storage, na pinananatili nang walang hanggan o 7 araw nang libre.

Bumuo ng kahilingan

Ang mga control ay binubuo mula sa schema ng modelo. Nagbabago ang code at presyo habang ina-adjust mo ang mga ito.

•kinakailangan image_url
Mag-drop ng file, o

URL na tumutukoy sa larawang ire-relight.

default na 2

Multiplier na inilalapat habang nag-u-upscale.

advanced fidelity · seed · aligned · only_center_face · face_upscale
default na 0.5

Weight na itinalaga sa fidelity factor.

Random seed na ginagawang nauulit ang pagbuo.

POST /run/codeformer?wait=20 presyo → $0.009
# 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/codeformer?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "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"

Patakbuhin ang kahilingang ito

Nananatili ang iyong key sa browser na ito: ipinapadala lamang ito sa Doitong API at sine-save (localStorage) lamang kung pipiliin mo ang Tandaan. Kumuha ng API key

Tungkol sa CodeFormer

Ibinabalik ang mga mukha ng tao sa sirang o malabong photo na ibinigay bilang `image_url`. Binabalanse ng `fidelity` ang restoration at orihinal na hitsura (default 0.5), habang pinalalaki ng `upscale_factor` ang output (default 2). Kasama sa mga toggle ang `only_center_face`, `aligned` at `face_upscale`, at ginagawang repeatable ng `seed` ang mga resulta.

Mga parameter

Ipadala ang canonical na pangalan o ang native na pangalan, hindi pareho. Mga canonical na pangalan

PangalanUri defaultPinapayagan Paglalarawan
image_urlkinakailangan image
Uriurl · image
URL na tumutukoy sa larawang ire-relight.
fidelityopsyonal
Urinumber
default0.5
Weight na itinalaga sa fidelity factor.
upscale_factoropsyonal
Urinumber
default2
≥ 1
Multiplier na inilalapat habang nag-u-upscale.
alignedopsyonal
Uriboolean
defaultfalse
Kung ia-align ang mga mukha at katulad na feature.
only_center_faceopsyonal
Uriboolean
defaultfalse
Kung lilimitahan ang restoration sa gitnang mukha.
face_upscaleopsyonal
Uriboolean
defaulttrue
Kung ilalapat ang upscaling sa mga mukha.
seedopsyonal
Uriinteger | null
Random seed na ginagawang nauulit ang pagbuo.
kinakailangan Canonical na pangalan, tinatanggap din

Tumatanggap ang mga parameter ng file ng pampublikong https:// URL, data: URI na hanggang 10 MB, o file_url ng isang upload. Mga file

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "codeformer",
  "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": 9,
    "usd": "0.009",
    "charged": 9,
    "refunded": 0
  },
  "input": {
    "image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  },
  "output": {
    "image": {
      "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
    },
    "seed": 42
  },
  "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"
  }
}
Ikaw ang pumipili para sa iyong mga fileAng bawat outputs[].url ay kopya sa aming storage: pinananatili nang walang hanggan (sinisingil bawat GB-month) o 7 araw nang libre, ayon sa setting ng iyong account o ?storage=.
Parehong shape sa bawat modelotype, url, content_type, width, height at duration, para sa mga larawan, video at audio. Ang output ay sariling result object ng modelo.
Mga field ng output
image
object {url, content_type, file_name, file_size, width, height}Impormasyon ng file para sa nabuong larawan.
seed
integerSeed para sa pagbuo ng larawan, kasama ang random na napiling value kung walang seed sa input; kung hindi, inuulit nito ang ibinigay na value.

Para sa mga AI agent: nasa Markdown ang pahinang ito sa https://doitong.com/fil/developers/models/codeformer.md. Lahat ng modelo at gabay: https://doitong.com/developers/llms.txt