API Reference

Documentation

Everything you need to integrate Pawan.Krd into your application.

Images

Generate, edit, or upscale images. Pawan.Krd exposes three OpenAI-compatible endpoints for image models depending on which type they declare.

Generate

POST/v1/images/generations
📋Request
1{ 2 "model": "your-image-model", 3 "prompt": "A cozy cabin in the snowy woods at night, cinematic lighting", 4 "n": 1, 5 "size": "1024x1024", 6 "steps": 30, 7 "guidance_scale": 7, 8 "response_format": "url" 9}

Parameters (generation)

model
stringrequired
Image model id (type: image-generation).
prompt
stringrequired
Text description of the image to generate.
n
integer
Number of images to generate.
size
string
WIDTHxHEIGHT, e.g. "1024x1024".
aspect_ratio
string
Alternative to size, e.g. "16:9".
steps
integer
Diffusion / sampling steps.
guidance_scale
number
CFG scale — how strictly the model follows the prompt.
seed
integer
Deterministic seed.
negative_prompt
string
Things you do not want in the image (when supported).
response_format
string
"url" or "b64_json".
scheduler
string
Sampler/scheduler name (when supported).

Response

📋200 OK
1{ 2 "created": 1700000000, 3 "data": [ 4 { "url": "https://cdn.pawan.krd/images/abc123.png" } 5 ] 6}

Edit (inpainting / instructed)

POST/v1/images/edits

Use multipart/form-data with an image file and an optional mask. Models with inpainting respect the mask's transparent regions; instructed models edit the whole image based on the prompt.

💻curl
1curl https://api.pawan.krd/v1/images/edits \ 2 -H "Authorization: Bearer pk-your_key" \ 3 -F model="your-image-model" \ 4 -F image=@input.png \ 5 -F mask=@mask.png \ 6 -F prompt="Replace the sky with a sunset" \ 7 -F size="1024x1024"

Upscale

POST/v1/images/upscale

Upscale an input image. The maximum supported factor is per-model (e.g. 2x, 4x, 8x).

💻curl
1curl https://api.pawan.krd/v1/images/upscale \ 2 -H "Authorization: Bearer pk-your_key" \ 3 -F model="your-upscale-model" \ 4 -F image=@input.png \ 5 -F upscale_factor=4
✓

Async uploads

For large multipart bodies (high-res inputs, masks, etc.), prefer the file-form variants shown above instead of inline base64 to keep payload sizes small.