ਸਮੱਗਰੀ ਵੱਲ ਜਾਓ

Upscale Images

ਇੰਟੀਗ੍ਰੇਟ ਕਰੋ

ਮਾਡਲ id esrgan
# 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/esrgan?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"

ਹਰ ਰਨ ਲਈ $0.518 ਤੱਕ ਅਸਲ ਵਰਤੋਂ ਅਨੁਸਾਰ ਚਾਰਜ ਕੀਤਾ ਜਾਂਦਾ ਹੈ, ਬਾਕੀ ਦੀ ਰਕਮ ਵਾਪਸੀ ਹੁੰਦੀ ਹੈ ਇਸ ਪੰਨੇ ’ਤੇ ਚਲਾਓ

API ਕੁੰਜੀ ਲਵੋ
Open model ਅੱਪਸਕੇਲ #upscaling#high-res

ਚੋਣਯੋਗ Real-ESRGAN ਮਾਡਲਾਂ ਅਤੇ ਵਿਕਲਪਿਕ ਫੇਸ ਮੋਡ ਨਾਲ ਚਿੱਤਰ ਨੂੰ 1 ਤੋਂ 8 ਗੁਣਾ ਅਪਸਕੇਲ ਕਰਦਾ ਹੈ

Open model · ਚਿੱਤਰ

ਤੁਹਾਡਾ ਪਹਿਲਾ ਨਤੀਜਾ ਇੱਥੇ ਹੋਵੇਗਾ

ਹੇਠਾਂ ਬੇਨਤੀ ਬਣਾਓ ਅਤੇ ਆਪਣੀ API ਕੁੰਜੀ ਨਾਲ ਚਲਾਓ। ਆਉਟਪੁੱਟ ਸਾਡੇ ਸਟੋਰੇਜ ਵਿੱਚ ਕਾਪੀ ਕੀਤੇ ਜਾਂਦੇ ਹਨ ਅਤੇ ਹਮੇਸ਼ਾ ਲਈ ਜਾਂ ਮੁਫ਼ਤ ਵਿੱਚ 7 ਦਿਨ ਤੱਕ ਰੱਖੇ ਜਾਂਦੇ ਹਨ।

ਰਿਕਵੈਸਟ ਬਣਾਓ

ਕੰਟਰੋਲ ਮਾਡਲ ਸਕੀਮਾ ਤੋਂ ਤਿਆਰ ਹੁੰਦੇ ਹਨ। ਤੁਸੀਂ ਬਦਲਾਅ ਕਰਦੇ ਹੀ ਕੋਡ ਅਤੇ ਕੀਮਤ ਅੱਪਡੇਟ ਹੋ ਜਾਂਦੇ ਹਨ।

•ਲੋੜੀਂਦਾ image_url
ਫ਼ਾਈਲ ਛੱਡੋ, ਜਾਂ

ਇਨਪੁੱਟ ਚਿੱਤਰ ਦਾ URL।

ਉੱਨਤ output_format · model · scale · tile · face
output_format ਡਿਫ਼ਾਲਟ png

ਆਉਟਪੁੱਟ ਚਿੱਤਰ ਦਾ ਫਾਰਮੈਟ: png ਜਾਂ jpeg।

ਡਿਫ਼ਾਲਟ RealESRGAN_x4plus

ਅਪਸਕੇਲਿੰਗ ਲਈ ਚੁਣਿਆ ਗਿਆ ਮਾਡਲ।

ਡਿਫ਼ਾਲਟ 2

ਚਿੱਤਰ ਸਕੇਲਿੰਗ ਗੁਣਕ।

ਡਿਫ਼ਾਲਟ 0

GPU ਮੈਮੋਰੀ ਨਾਕਾਫ਼ੀ ਹੋਣ 'ਤੇ ਸੈੱਟ ਕੀਤਾ ਜਾਣ ਵਾਲਾ ਟਾਈਲ ਆਕਾਰ, ਜਿਵੇਂ 400 ਜਾਂ 200; ਨਹੀਂ ਤਾਂ ਪੂਰਵ-ਨਿਰਧਾਰਤ 0 ਟਾਈਲਿੰਗ ਨੂੰ ਬੰਦ ਰੱਖਦਾ ਹੈ।

POST /run/esrgan?wait=20 ਕੋਟ → $0.518
# 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/esrgan?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"

ਇਹ ਬੇਨਤੀ ਚਲਾਓ

ਤੁਹਾਡੀ key ਇਸ ਬ੍ਰਾਊਜ਼ਰ ਵਿੱਚ ਰਹਿੰਦੀ ਹੈ: ਇਹ ਸਿਰਫ਼ Doitong API ਨੂੰ ਭੇਜੀ ਜਾਂਦੀ ਹੈ ਅਤੇ ਸਿਰਫ਼ ਤਾਂ ਹੀ (localStorage) ਵਿੱਚ ਸੁਰੱਖਿਅਤ ਹੁੰਦੀ ਹੈ ਜੇ ਤੁਸੀਂ Remember ਚੁਣੋ। API ਕੁੰਜੀ ਪ੍ਰਾਪਤ ਕਰੋ

Upscale Images ਬਾਰੇ

`image_url` ਵਾਲੇ ਚਿੱਤਰ ਨੂੰ 1 ਤੋਂ 8 ਵਿਚਕਾਰ `scale` ਵਰਤ ਕੇ ਵੱਡਾ ਕਰਦਾ ਹੈ। `model` ਵਿੱਚ RealESRGAN x4plus, x2plus ਅਤੇ anime ਵੈਰੀਐਂਟ ਸ਼ਾਮਲ ਹਨ, ਅਤੇ `face` ਫੇਸ ਅਪਸਕੇਲਿੰਗ ਚਾਲੂ ਕਰਦਾ ਹੈ। `tile` ਮੈਮੋਰੀ ਦੀ ਵਰਤੋਂ ਘਟਾਉਣ ਲਈ ਵੱਡੇ ਚਿੱਤਰਾਂ ਨੂੰ ਵੰਡਦਾ ਹੈ। ਆਉਟਪੁੱਟ png ਜਾਂ jpeg ਹੁੰਦੀ ਹੈ।

ਪੈਰਾਮੀਟਰ

ਕੈਨੋਨਿਕਲ ਨਾਮ ਜਾਂ ਨੇਟਿਵ ਨਾਮ ਵਿੱਚੋਂ ਕੋਈ ਇੱਕ ਭੇਜੋ, ਦੋਵੇਂ ਨਹੀਂ। ਕੈਨੋਨਿਕਲ ਨਾਮ

ਨਾਮਕਿਸਮ ਡਿਫ਼ਾਲਟਮਨਜ਼ੂਰਸ਼ੁਦਾ ਵੇਰਵਾ
image_urlਲੋੜੀਂਦਾ image
ਕਿਸਮurl · image
ਇਨਪੁੱਟ ਚਿੱਤਰ ਦਾ URL।
scaleਵਿਕਲਪਿਕ
ਕਿਸਮnumber
ਡਿਫ਼ਾਲਟ2
1 – 8
ਚਿੱਤਰ ਸਕੇਲਿੰਗ ਗੁਣਕ।
tileਵਿਕਲਪਿਕ
ਕਿਸਮinteger
ਡਿਫ਼ਾਲਟ0
GPU ਮੈਮੋਰੀ ਨਾਕਾਫ਼ੀ ਹੋਣ 'ਤੇ ਸੈੱਟ ਕੀਤਾ ਜਾਣ ਵਾਲਾ ਟਾਈਲ ਆਕਾਰ, ਜਿਵੇਂ 400 ਜਾਂ 200; ਨਹੀਂ ਤਾਂ ਪੂਰਵ-ਨਿਰਧਾਰਤ 0 ਟਾਈਲਿੰਗ ਨੂੰ ਬੰਦ ਰੱਖਦਾ ਹੈ।
faceਵਿਕਲਪਿਕ
ਕਿਸਮboolean
ਡਿਫ਼ਾਲਟfalse
ਚਿਹਰਾ ਅਪਸਕੇਲਿੰਗ ਨੂੰ ਨਿਯੰਤਰਿਤ ਕਰਦਾ ਹੈ।
modelਵਿਕਲਪਿਕ
ਕਿਸਮenum
ਡਿਫ਼ਾਲਟRealESRGAN_x4plus
RealESRGAN_x4plusRealESRGAN_x2plusRealESRGAN_x4plus_anime_6BRealESRGAN_x4_v3RealESRGAN_x4_wdn_v3RealESRGAN_x4_anime_v3
ਅਪਸਕੇਲਿੰਗ ਲਈ ਚੁਣਿਆ ਗਿਆ ਮਾਡਲ।
output_formatਵਿਕਲਪਿਕ
ਕਿਸਮenum
ਡਿਫ਼ਾਲਟpng
pngjpeg
ਆਉਟਪੁੱਟ ਚਿੱਤਰ ਦਾ ਫਾਰਮੈਟ: png ਜਾਂ jpeg।
ਲੋੜੀਂਦਾ ਕੈਨੋਨਿਕਲ ਨਾਮ, ਇਹ ਵੀ ਸਵੀਕਾਰਿਆ ਜਾਂਦਾ ਹੈ

ਫ਼ਾਈਲ ਪੈਰਾਮੀਟਰ ਜਨਤਕ https:// URL, 10 MB ਤੱਕ ਦਾ data: URI, ਜਾਂ ਅੱਪਲੋਡ ਦੇ file_url ਨੂੰ ਸਵੀਕਾਰਦੇ ਹਨ। ਫ਼ਾਈਲਾਂ

ਆਉਟਪੁੱਟ

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "esrgan",
  "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": 518,
    "usd": "0.518",
    "charged": 518,
    "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
    }
  },
  "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"
  }
}
ਤੁਹਾਡੀਆਂ ਫ਼ਾਈਲਾਂ, ਤੁਹਾਡੀ ਚੋਣਹਰ outputs[].url ਸਾਡੇ ਸਟੋਰੇਜ ਵਿੱਚ ਇੱਕ ਕਾਪੀ ਹੈ: ਹਮੇਸ਼ਾ ਲਈ ਰੱਖੀ ਜਾਂਦੀ ਹੈ (ਪ੍ਰਤੀ GB-ਮਹੀਨਾ ਭੁਗਤਾਨ) ਜਾਂ 7 ਦਿਨ ਤੱਕ ਮੁਫ਼ਤ, ਤੁਹਾਡੀ ਖਾਤਾ ਸੈਟਿੰਗ ਜਾਂ ?storage= ਅਨੁਸਾਰ।
ਹਰ ਮਾਡਲ ’ਤੇ ਇੱਕੋ ਜਿਹਾ ਰੂਪਤਸਵੀਰਾਂ, ਵੀਡੀਓ ਅਤੇ ਆਡੀਓ ਸਭ ਲਈ type, url, content_type, width, height ਅਤੇ duration। output ਮਾਡਲ ਦਾ ਆਪਣਾ ਨਤੀਜਾ ਆਬਜੈਕਟ ਹੈ।
ਆਉਟਪੁੱਟ ਦੇ ਫ਼ੀਲਡ
image
object {url, content_type, file_name, file_size, width, height}ਅੱਪਸਕੇਲਿੰਗ ਦੁਆਰਾ ਤਿਆਰ ਕੀਤਾ ਚਿੱਤਰ।

AI ਏਜੰਟਾਂ ਲਈ: ਇਹ ਪੰਨਾ Markdown ਵਜੋਂ ਇੱਥੇ ਹੈ https://doitong.com/pa/developers/models/esrgan.md. ਸਾਰੇ ਮਾਡਲ ਅਤੇ ਗਾਈਡ: https://doitong.com/developers/llms.txt