SwinIR
SwinIR is an image restoration and super-resolution model based on Swin Transformer blocks, producing high-quality upscales with strong texture recovery and low artifact levels across common restoration settings.

API Reference
INTEGRATE
Complete technical specification for integration
RequestResponse
Examples8
CODE
Ready-to-use code snippets for common workflows
Japanese Firecoat Conservation Master

import { createClient } from '@runware/sdk'
const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()
const [result] = await client.run({
model: 'runware:503@1',
upscaleFactor: 4,
inputs: {
image: 'https://assets.runware.ai/assets/inputs/2f90022f-c6e7-46da-a2da-79f2cff562bb.jpg'
}
})import asyncio
import os
from runware import Runware
async def main():
async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
results = await client.run({
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/2f90022f-c6e7-46da-a2da-79f2cff562bb.jpg"
}
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "upscale",
"taskUUID": "2eba213a-8bba-443e-9367-320df28bd847",
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/2f90022f-c6e7-46da-a2da-79f2cff562bb.jpg"
}
}
]'runware run runware:503@1 \
upscaleFactor=4 \
inputs.image=https://assets.runware.ai/assets/inputs/2f90022f-c6e7-46da-a2da-79f2cff562bb.jpg{
"taskType": "upscale",
"taskUUID": "2eba213a-8bba-443e-9367-320df28bd847",
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/2f90022f-c6e7-46da-a2da-79f2cff562bb.jpg"
}
}{
"taskType": "imageUpscale",
"taskUUID": "2eba213a-8bba-443e-9367-320df28bd847",
"imageUUID": "2fcbc251-dcaf-40e1-94cc-df2ab4133a57",
"imageURL": "https://im.runware.ai/image/os/a09dlim3/ws/4/ii/2fcbc251-dcaf-40e1-94cc-df2ab4133a57.jpg",
"cost": 0.007,
"inputImageUUID": "7f5acb57-873f-40b1-a72c-22d9c784b613"
}Arctic Greenhouse Blue-Hour Enlargement

import { createClient } from '@runware/sdk'
const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()
const [result] = await client.run({
model: 'runware:503@1',
upscaleFactor: 4,
inputs: {
image: 'https://assets.runware.ai/assets/inputs/0b2f0308-ab02-493e-8af8-a89c461c8643.jpg'
}
})import asyncio
import os
from runware import Runware
async def main():
async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
results = await client.run({
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/0b2f0308-ab02-493e-8af8-a89c461c8643.jpg"
}
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "upscale",
"taskUUID": "b405138b-71ff-472f-b8bc-b18a70ef089d",
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/0b2f0308-ab02-493e-8af8-a89c461c8643.jpg"
}
}
]'runware run runware:503@1 \
upscaleFactor=4 \
inputs.image=https://assets.runware.ai/assets/inputs/0b2f0308-ab02-493e-8af8-a89c461c8643.jpg{
"taskType": "upscale",
"taskUUID": "b405138b-71ff-472f-b8bc-b18a70ef089d",
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/0b2f0308-ab02-493e-8af8-a89c461c8643.jpg"
}
}{
"taskType": "imageUpscale",
"taskUUID": "b405138b-71ff-472f-b8bc-b18a70ef089d",
"imageUUID": "51c554a6-e824-4f95-a200-579508a56271",
"imageURL": "https://im.runware.ai/image/os/a04d20/ws/4/ii/51c554a6-e824-4f95-a200-579508a56271.jpg",
"cost": 0.0032,
"inputImageUUID": "33cc1435-de35-4ddb-b1bc-2fd28ee5ec72"
}Cyanotype Fossil Exhibition Portrait

import { createClient } from '@runware/sdk'
const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()
const [result] = await client.run({
model: 'runware:503@1',
upscaleFactor: 4,
inputs: {
image: 'https://assets.runware.ai/assets/inputs/62bf2181-a2ab-4329-97fc-ad2682cb8513.jpg'
}
})import asyncio
import os
from runware import Runware
async def main():
async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
results = await client.run({
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/62bf2181-a2ab-4329-97fc-ad2682cb8513.jpg"
}
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "upscale",
"taskUUID": "de9d1022-d12a-4026-bbac-5ac93d4325eb",
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/62bf2181-a2ab-4329-97fc-ad2682cb8513.jpg"
}
}
]'runware run runware:503@1 \
upscaleFactor=4 \
inputs.image=https://assets.runware.ai/assets/inputs/62bf2181-a2ab-4329-97fc-ad2682cb8513.jpg{
"taskType": "upscale",
"taskUUID": "de9d1022-d12a-4026-bbac-5ac93d4325eb",
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/62bf2181-a2ab-4329-97fc-ad2682cb8513.jpg"
}
}{
"taskType": "imageUpscale",
"taskUUID": "de9d1022-d12a-4026-bbac-5ac93d4325eb",
"imageUUID": "6e6e9536-1b3e-44df-a39b-812869f74a9d",
"imageURL": "https://im.runware.ai/image/os/a10dlim3/ws/4/ii/6e6e9536-1b3e-44df-a39b-812869f74a9d.jpg",
"cost": 0.0038,
"inputImageUUID": "c839abf2-4d7c-4413-b82b-e9dc1acd04e1"
}Vintage Sextant Auction Catalog Master

import { createClient } from '@runware/sdk'
const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()
const [result] = await client.run({
model: 'runware:503@1',
upscaleFactor: 4,
inputs: {
image: 'https://assets.runware.ai/assets/inputs/9bd6fb5c-f794-4403-aaa9-df26464cb816.jpg'
}
})import asyncio
import os
from runware import Runware
async def main():
async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
results = await client.run({
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/9bd6fb5c-f794-4403-aaa9-df26464cb816.jpg"
}
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "upscale",
"taskUUID": "e4517d73-25ea-4473-b97f-f69eae118a28",
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/9bd6fb5c-f794-4403-aaa9-df26464cb816.jpg"
}
}
]'runware run runware:503@1 \
upscaleFactor=4 \
inputs.image=https://assets.runware.ai/assets/inputs/9bd6fb5c-f794-4403-aaa9-df26464cb816.jpg{
"taskType": "upscale",
"taskUUID": "e4517d73-25ea-4473-b97f-f69eae118a28",
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/9bd6fb5c-f794-4403-aaa9-df26464cb816.jpg"
}
}{
"taskType": "imageUpscale",
"taskUUID": "e4517d73-25ea-4473-b97f-f69eae118a28",
"imageUUID": "13bee6cc-974d-48ba-89e0-78283e5dca13",
"imageURL": "https://im.runware.ai/image/os/a10dlim3/ws/4/ii/13bee6cc-974d-48ba-89e0-78283e5dca13.jpg",
"cost": 0.0019,
"inputImageUUID": "9efae5a0-5610-4163-be55-84ef9c921905"
}Pixelated Arcade Alley Scene

import { createClient } from '@runware/sdk'
const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()
const [result] = await client.run({
model: 'runware:503@1',
upscaleFactor: 4,
inputs: {
image: 'https://assets.runware.ai/assets/inputs/2b6c78d7-40b4-4700-a6d0-77f4d6a5cd14.jpg'
}
})import asyncio
import os
from runware import Runware
async def main():
async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
results = await client.run({
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/2b6c78d7-40b4-4700-a6d0-77f4d6a5cd14.jpg"
}
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "upscale",
"taskUUID": "315ebd18-b9b5-4d3f-a063-821c507956ae",
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/2b6c78d7-40b4-4700-a6d0-77f4d6a5cd14.jpg"
}
}
]'runware run runware:503@1 \
upscaleFactor=4 \
inputs.image=https://assets.runware.ai/assets/inputs/2b6c78d7-40b4-4700-a6d0-77f4d6a5cd14.jpg{
"taskType": "upscale",
"taskUUID": "315ebd18-b9b5-4d3f-a063-821c507956ae",
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/2b6c78d7-40b4-4700-a6d0-77f4d6a5cd14.jpg"
}
}{
"taskType": "imageUpscale",
"taskUUID": "315ebd18-b9b5-4d3f-a063-821c507956ae",
"imageUUID": "4853f87e-32bf-4b1a-8ebe-2e7d59ab37dd",
"imageURL": "https://im.runware.ai/image/os/a05d22/ws/3/ii/4853f87e-32bf-4b1a-8ebe-2e7d59ab37dd.jpg",
"cost": 0.0019,
"inputImageUUID": "db766aa6-e919-4aaa-bc40-db280bf45eb6"
}Weathered Lighthouse Logbook Scan

import { createClient } from '@runware/sdk'
const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()
const [result] = await client.run({
model: 'runware:503@1',
upscaleFactor: 4,
inputs: {
image: 'https://assets.runware.ai/assets/inputs/e5b4d22d-8aa9-4f7a-a8df-d88247266845.jpg'
}
})import asyncio
import os
from runware import Runware
async def main():
async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
results = await client.run({
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/e5b4d22d-8aa9-4f7a-a8df-d88247266845.jpg"
}
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "upscale",
"taskUUID": "a744f0ea-5658-4fab-9718-46361f18569e",
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/e5b4d22d-8aa9-4f7a-a8df-d88247266845.jpg"
}
}
]'runware run runware:503@1 \
upscaleFactor=4 \
inputs.image=https://assets.runware.ai/assets/inputs/e5b4d22d-8aa9-4f7a-a8df-d88247266845.jpg{
"taskType": "upscale",
"taskUUID": "a744f0ea-5658-4fab-9718-46361f18569e",
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/e5b4d22d-8aa9-4f7a-a8df-d88247266845.jpg"
}
}{
"taskType": "imageUpscale",
"taskUUID": "a744f0ea-5658-4fab-9718-46361f18569e",
"imageUUID": "9614db90-5c8c-4a95-be79-32fe78c018c7",
"imageURL": "https://im.runware.ai/image/os/a02d21/ws/3/ii/9614db90-5c8c-4a95-be79-32fe78c018c7.jpg",
"cost": 0.0051,
"inputImageUUID": "0ab06228-4ef2-433a-aa57-5f3a85ff7c28"
}Pixel Sprite Garden Cleanup

import { createClient } from '@runware/sdk'
const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()
const [result] = await client.run({
model: 'runware:503@1',
upscaleFactor: 4,
inputs: {
image: 'https://assets.runware.ai/assets/inputs/a4054348-eb95-4a0b-b0d0-467f52c44901.jpg'
}
})import asyncio
import os
from runware import Runware
async def main():
async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
results = await client.run({
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/a4054348-eb95-4a0b-b0d0-467f52c44901.jpg"
}
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "upscale",
"taskUUID": "2149218f-0a72-4497-913d-d4053a672a16",
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/a4054348-eb95-4a0b-b0d0-467f52c44901.jpg"
}
}
]'runware run runware:503@1 \
upscaleFactor=4 \
inputs.image=https://assets.runware.ai/assets/inputs/a4054348-eb95-4a0b-b0d0-467f52c44901.jpg{
"taskType": "upscale",
"taskUUID": "2149218f-0a72-4497-913d-d4053a672a16",
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/a4054348-eb95-4a0b-b0d0-467f52c44901.jpg"
}
}{
"taskType": "imageUpscale",
"taskUUID": "2149218f-0a72-4497-913d-d4053a672a16",
"imageUUID": "8fa80346-4ec1-47bb-ba26-d19648203852",
"imageURL": "https://im.runware.ai/image/os/a02d21/ws/3/ii/8fa80346-4ec1-47bb-ba26-d19648203852.jpg",
"cost": 0.0019,
"inputImageUUID": "1d693757-b01d-4d39-a6f1-081d873be40e"
}Graffiti-Covered Skatepark Panorama

import { createClient } from '@runware/sdk'
const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()
const [result] = await client.run({
model: 'runware:503@1',
upscaleFactor: 4,
inputs: {
image: 'https://assets.runware.ai/assets/inputs/e47c5599-88b7-49c1-be9f-580b03006a82.jpg'
}
})import asyncio
import os
from runware import Runware
async def main():
async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
results = await client.run({
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/e47c5599-88b7-49c1-be9f-580b03006a82.jpg"
}
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "upscale",
"taskUUID": "f2c9bac0-9530-438b-96c3-f5b55b970215",
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/e47c5599-88b7-49c1-be9f-580b03006a82.jpg"
}
}
]'runware run runware:503@1 \
upscaleFactor=4 \
inputs.image=https://assets.runware.ai/assets/inputs/e47c5599-88b7-49c1-be9f-580b03006a82.jpg{
"taskType": "upscale",
"taskUUID": "f2c9bac0-9530-438b-96c3-f5b55b970215",
"model": "runware:503@1",
"upscaleFactor": 4,
"inputs": {
"image": "https://assets.runware.ai/assets/inputs/e47c5599-88b7-49c1-be9f-580b03006a82.jpg"
}
}{
"taskType": "imageUpscale",
"taskUUID": "f2c9bac0-9530-438b-96c3-f5b55b970215",
"imageUUID": "3282b118-bf3f-490f-bcb8-4ec5659c31a5",
"imageURL": "https://im.runware.ai/image/os/a16d07/ws/3/ii/3282b118-bf3f-490f-bcb8-4ec5659c31a5.jpg",
"cost": 0.0166,
"inputImageUUID": "b4697a97-8a99-4399-9aa6-93e71e93ffac"
}