Parameters

  • prompt

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

    • Type: string
    • Required: false
  • image

    • Type: string
    • Required: false
    • Description: Image URL for the model to use when doing img2img
  • width

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

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

    • Type: number
    • Required: false
    • Default: 50
  • number

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

    • Type: number
    • Required: false
  • sampler

    • Type: string
    • Required: false
    • Options: k_lms, k_heun, k_euler, k_euler_a, k_dpm_2, k_dpm_2_a, DDIM, k_dpm_fast, k_dpm_adaptive, k_dpmpp_2m, k_dpmpp_2s_a, k_dpmpp_sde
  • cfg_scale

    • Type: number
    • Required: false
  • seed

    • Type: number
    • Required: false
  • model

    • Type: string
    • Required: false
    • Options: SDXL 1.0, AlbedoBase XL (SDXL), ICBINP XL, TURBO XL, Fustercluck, stable_cascade
    • Default: stable_cascade
  • nsfw

    • Type: boolean
    • Required: false
  • stream

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

Response

  • cost

    • Type: number
    • Description: Cost of the request in USD
  • id

    • Type: string
    • Description: ID of the request
  • status

    • Type: string
    • Description: Status of the request
  • progress

    • Type: number
    • Description: Progress of the request
  • queue_position

    • Type: number
    • Description: Queue position of the request
  • results

    • Type: array
    • Description: Results of the request

Examples

Stablehorde example
import axios from "axios";
(async () => {
  let response = await axios({
    method: "post",
    url: 'https://api.turing.sh/image/sh',
    headers: {
      "Content-Type": "application/json",
      Authorization: "Bearer YOUR_API_KEY",
      "x-captcha-token": "Captcha key"
    },
    data: {
"prompt": "string",
"width": 512,
"height": 512,
"steps": 50,
"number": 1,
"sampler": "k_lms",
"model": "stable_cascade",
"stream": true
},
  })
})();