Skip to main content
POST
https://gptproto.com
/
api
/
v3
/
novel
/
nai-diffusion-4-5-curated
/
image-to-image
nai-diffusion-4-5-curated (Image To Image)
curl --request POST \
  --url https://gptproto.com/api/v3/novel/nai-diffusion-4-5-curated/image-to-image

Authentication

  1. Sign up for a GPTProto account at https://gptproto.com
  2. Navigate to the API Keys section in your dashboard
  3. Generate a new API key (sk-xxxxx)
  4. Copy and securely store your API key For authentication details, please refer to the Authentication section.

Initiate Request

curl --location 'https://gptproto.com/api/v3/novel/nai-diffusion-4-5-curated/image-to-image' \
--header 'Authorization: GPTPROTO_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
  "prompt": "1girl, cute, anime style, blue eyes, smile",
  "negative_prompt": "lowres, bad anatomy, text, error",
  "action": "img2img",
  "size": "1400x1400",
  "n": 1,
  "quality_toggle": true,
  "steps": 23,
  "scale": 5,
  "sampler": "k_euler_ancestral",
  "image": "https://oss.gptproto.com/frontend/gptproto/images-32018c61-b144-4a83-acbd-bd4e77688315.png",
  "strength": 0.5,
  "noise": 0
}'

Query Result

If the request that generated your content includes the parameter enable_sync_mode set to true (some models do not support this parameter, but you still need to query the result by id), you must call the Query Result endpoint to retrieve the final output.
curl -X GET "https://gptproto.com/api/v3/predictions/{id}/result" \
  -H "Authorization: GPTPROTO_API_KEY" \
  -H "Content-Type: application/json"
After submitting your prediction request, the response will contain the id you need.
You can find it in either:
  • data.id – the unique identifier of the prediction
  • data.urls[0].get – a ready-to-use GET URL that already embeds the id
{
    "data": {
        "id": "abc",
        "model": "model_name",
        "outputs": [],
        "urls": {
            "get": "https://gptproto.com/api/v3/predictions/abc/result"
        },
        "status": "completed",
        "error": null,
        "executionTime": 0,
        "timings": {
            "inference": 0
        },
        "has_nsfw_contents": [],
        "created_at": "2026-01-01 00:00:00"
    },
    "message": "success",
    "code": 200
}

Parameters

Request Body

Core Parameters

ParameterTypeRequiredDefaultRangeDescription
promptstring✅ Yes--Image description prompt
actionstring❌ Nogenerategenerate
img2img
infill
Generation mode
sizestring❌ No832x121664x64 - 49152x49152Image size in format widthxheight. See Common Sizes for recommended values
ninteger❌ No11 - 4Number of images to generate

Prompt Control Parameters

ParameterTypeRequiredDefaultRangeDescription
negative_promptstring❌ No""-Negative prompt to avoid certain elements
quality_toggleboolean❌ Notrue-Automatically add quality tags
uc_presetinteger❌ No00 - 3Negative content preset strength:
0 = Heavy,
1 = Light,
2 = Human Focus,
3 = None

AI Generation Control Parameters

ParameterTypeRequiredDefaultRangeDescription
stepsinteger❌ No281 - 50Sampling steps
scalefloat❌ No6.00 - 10CFG Scale (prompt guidance strength)
samplerstring❌ Nok_euler_ancestralSee SamplersSampling method
noise_schedulestring❌ Nokarrasnative
karras
exponential
Noise schedule algorithm
seedinteger❌ NoRandom0 - 4294967295Random seed for reproducibility
cfg_rescalefloat❌ No00 - 1CFG rescale value

Advanced Parameters

ParameterTypeRequiredDefaultDescription
dynamic_thresholdingboolean❌ NofalseEnable dynamic thresholding (Decrisper)
auto_smeaboolean❌ NofalseAutomatically enable SMEA (V4/V4.5)
skip_cfg_above_sigmainteger❌ NonullVariety Boost (diversity enhancement)
legacyboolean❌ NofalseUse legacy mode
use_coordsboolean❌ NofalseUse coordinate positioning (for multi-character)

Image-to-Image Parameters

These parameters are only used when action is set to img2img
{
  "prompt": "1girl, cute, anime style, colorful",
  "action": "img2img",
  "image": "https://example.com/image.jpg",
  "strength": 0.7,
  "size": "832x1216"
}
ParameterTypeRequiredDefaultRangeDescription
imagestring✅ Yes
(when action=img2img)
--Input image (Base64 encoded or URL)
strengthfloat❌ No0.70.01 - 0.99Transformation strength. Higher values result in more changes
noisefloat❌ No00 - 0.99Additional noise for increased randomness

Vibe Transfer Parameters

{
  "prompt": "1girl, beautiful landscape, fantasy art",
  "size": "832x1216",
  "vibe_transfer": [
    {
      "image": "https://example.com/reference.jpg",
      "strength": 0.7,
      "information_extracted": 1.0
    }
  ]
}
ParameterTypeRequiredDefaultRangeDescription
vibe_transferarray❌ No--Array of style reference images
vibe_transfer[].imagestring✅ Yes--Reference image (Base64 or URL)
vibe_transfer[].information_extractedfloat❌ No1.00.01 - 1.0Information extraction level
vibe_transfer[].strengthfloat❌ No0.60.01 - 1.0Style transfer strength

Multi-Character Generation (V4.5 Only)

Multi-character features are only supported by V4.5 models (nai-diffusion-4-5-full or nai-diffusion-4-5-curated)
{
  "prompt": "2girls, anime style, outdoor",
  "size": "1216x832",
  "character_prompts": [
    {
      "prompt": "1girl, long hair, blue eyes, smile",
      "uc": "lowres, bad anatomy",
      "center": {
        "x": 0.3,
        "y": 0.5
      },
      "enabled": true
    },
    {
      "prompt": "1girl, short hair, red eyes, serious",
      "uc": "lowres, bad anatomy",
      "center": {
        "x": 0.7,
        "y": 0.5
      },
      "enabled": true
    }
  ],
  "use_coords": true
}
ParameterTypeRequiredDefaultRangeDescription
character_promptsarray❌ No--Array of character prompts
character_prompts[].promptstring✅ Yes--Character-specific prompt
character_prompts[].ucstring❌ No"lowres, aliasing,"-Character-specific negative prompt
character_prompts[].centerobject❌ No--Character position coordinates
character_prompts[].center.xfloat❌ No0.50.1 - 0.9X coordinate, 0.5 = horizontal center
character_prompts[].center.yfloat❌ No0.50.1 - 0.9Y coordinate, 0.5 = vertical center
character_prompts[].enabledboolean❌ Notrue-Enable this character

ControlNet Parameters (V4/V4.5 Only)

ControlNet is only supported by V4 and V4.5 models
{
  "prompt": "beautiful landscape, detailed, high quality",
  "controlnet_model": "hed",
  "controlnet_condition": "https://example.com/control-image.jpg",
  "controlnet_strength": 1.2,
  "size": "1216x832"
}
ParameterTypeRequiredDefaultRangeDescription
controlnet_modelstring❌ No-See belowControlNet model type
controlnet_conditionstring❌ No--Control condition image (Base64 or URL)
controlnet_strengthfloat❌ No1.00.1 - 2.0Control strength
ControlNet Models:
  • hed - Palette Swap
  • midas - Form Lock (depth-based)
  • fake_scribble - Scribbler
  • mlsd - Building Control (line-based)
  • uniformer - Landscaper (segmentation-based)

Director Reference Parameters (V4/V4.5 Only)

Director Reference provides more precise character and style control. Supported models: nai-diffusion-4-5-full, nai-diffusion-4-5-curated, nai-diffusion-4-full, nai-diffusion-4-curated-preview
{
  "prompt": "solo, 1girl, cute, chibi, very aesthetic, masterpiece",
  "action": "img2img",
  "size": "896x1472",
  "image": "https://example.com/reference.jpg",
  "strength": 0.7,
  "steps": 23,
  "scale": 5.0,
  "sampler": "k_euler_ancestral",
  "director_reference_descriptions": [
    {
      "caption": {
        "base_caption": "character&style",
        "char_captions": []
      },
      "legacy_uc": false
    }
  ],
  "director_reference_information_extracted": [1],
  "director_reference_strength_values": [1],
  "director_reference_secondary_strength_values": [0]
}
ParameterTypeRequiredRangeDescription
director_reference_descriptionsarray❌ No-Array of reference descriptions
director_reference_descriptions[].captionobject✅ Yes-Caption object
director_reference_descriptions[].caption.base_captionstring✅ Yes-Reference description (e.g., “character&style”, “character1”)
director_reference_descriptions[].caption.char_captionsarray❌ No-Character caption array, typically empty
director_reference_descriptions[].legacy_ucboolean❌ No-Use legacy negative prompt, default false
director_reference_information_extractedarray❌ No0.0 - 1.0Array of information extraction levels
director_reference_strength_valuesarray❌ No0.0 - 1.0Array of primary strength values
director_reference_secondary_strength_valuesarray❌ No0.0 - 1.0Array of secondary strength values, typically 0

Supported Samplers

SamplerDescription
k_euler_ancestralEuler Ancestral (Default, Recommended)
k_eulerEuler
k_dpmpp_2mDPM++ 2M
k_dpmpp_sdeDPM++ SDE
k_dpmpp_2s_ancestralDPM++ 2S Ancestral
ddim_v3DDIM

Common Image Sizes

Size FormatAspect RatioUse Case
832x1216Portrait (9:13)Vertical character portraits (Default)
1024x1024Square (1:1)General purpose
1216x832Landscape (13:9)Horizontal landscapes
1472x832Widescreen (16:9)Widescreen backgrounds

Error Codes

Common Error Codes

Error CodeError NameDescription
401UnauthorizedAPI key is missing or invalid
403ForbiddenYour API key doesn’t have permission to access this resource, or insufficient balance for the requested operation
429Too Many RequestsYou’ve exceeded your rate limit
500Internal server errorAn internal server error occurred
503Content policy violationContent blocked due to safety concerns (actual status code is 400)