Parameters

  • prompt

    • Type: string
    • Required: true
    • Description: Prompt to generate the image
  • steps

    • Type: number
    • Required: false
    • Default: 100
  • number

    • Type: number
    • Required: false
    • Description: Number of images to generate
    • Default: 1
  • negative_prompt

    • Type: string
    • Required: false
    • Default: disfigured mouth, disfigured teeth, half head, half face, blury, side looking, old, wrinkle, child, no face, pencil, full body, sharp, far away, overlapping, duplication, nude, disfigured, kitsch, oversaturated, grain, low-res, Deformed, blurry, bad anatomy, poorly drawn face, mutation, mutated, extra limb, ugly, poorly drawn hands, missing limb, blurry, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long body, disgusting, poorly drawn, childish, mutilated, mangled, surreal, out of frame, duplicate, 2 faces
  • guidance_scale

    • Type: number
    • Required: false
    • Default: 4
  • width

    • Type: number
    • Required: false
    • Default: 512
  • height

    • Type: number
    • Required: false
    • Default: 512
  • cfg_scale

    • Type: number
    • Required: false
    • Default: 4
  • model_version

    • Type: string
    • Required: false
    • Options: 2.1, 2.2
    • Default: 2.2
  • stream

    • Type: boolean
    • Required: false
    • Default: true

Response

  • cost

    • Type: number
  • results

    • Type: array
  • status

    • Type: string
  • progress

    • Type: number
  • id

    • Type: string

Examples

Kandinsky 2.1 example
import axios from "axios";
(async () => {
  let response = await axios({
    method: "post",
    url: 'https://api.turing.sh/image/kandinsky',
    headers: {
      "Content-Type": "application/json",
      Authorization: "Bearer YOUR_API_KEY",
      "x-captcha-token": "Captcha key"
    },
    data: {
"prompt": "string",
"steps": 100,
"number": 1,
"negative_prompt": "disfigured mouth, disfigured teeth, half head, half face, blury, side looking, old, wrinkle, child, no face, pencil, full body, sharp, far away, overlapping, duplication, nude, disfigured, kitsch, oversaturated, grain, low-res, Deformed, blurry, bad anatomy, poorly drawn face, mutation, mutated, extra limb, ugly, poorly drawn hands, missing limb, blurry, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long body, disgusting, poorly drawn, childish, mutilated, mangled, surreal, out of frame, duplicate, 2 faces",
"guidance_scale": 4,
"width": 512,
"height": 512,
"cfg_scale": 4,
"model_version": "2.2",
"stream": true
},
  })
})();