Skip to main content

Doodle


Doodle

POST https://api.novita.ai/v3/doodle

Turn doodles into real images instantly.

Request header parameters

  • AuthorizationstringRequired

    In Bearer {{Key}} format.

  • Content-Typestring

    Only application/json supported

    Enum: application/json

Request Body parameters

  • image_filestringRequired

    The base64 of original image, with a maximum resolution of 1024 * 1024 and a max file size of 30 Mb.

  • promptstringRequired

    Positive prompt word for the doodle, divided by `,`, Range: [1, 1024]

  • similaritynumberRequired

    The similarity to the doodle images, range: (0, 1.0]. The larger the value, the more similar it is to doodle images. If similarity less than 0, the value will be set to 0.5.

  • extraobject

    Extra info.

    Show properties

Responses

  • image_filestring

  • image_typestring

Example

This API helps turn doodles into real images instantly.

Please set the Content-Type header to application/json in your HTTP request to indicate that you are sending JSON data. Currently, only JSON format is supported.

Try it in playgroundopen in new window.

Request:

curl --location --request POST 'https://api.novita.ai/v3/doodle' \
--header 'Authorization: Bearer {{key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "prompt": "a cute girl, sunny day",
    "similarity": 0.8,
    "image_file": "{{Base64 encoded image}}"
}'

HTTP status codes in the 2xx range indicate that the request has been successfully accepted, code 400 means requst params error, while status codes in the 5xx range indicate internal server errors.

You can get images url in image_file of response in base64 format.

Response:

{
    "image_file": "{{Base64 encoded image}}"
    "image_type": "png"
}
novita.ai API
novita.ai API