Webhook

Good to know: Because image generation takes a long time, when you request image generation, you will need to set up a webhook to listen for the event when the image is generated.

Setup

// First create a webhook with method post
// example: https://telegram.crazyhorse.ai/webhook
// payload: {
        "state": "DONE",
        "code": "89e78b15d29165008cbfd61ba3bb679f",
        "image": "ced3e3051c203193952d8b51fe5c9d82/89e78b15d29165008cbfd61ba3bb679f.png",
        "generateImageUrls": [
            "ced3e3051c203193952d8b51fe5c9d82/89e78b15d29165008cbfd61ba3bb679f/generate-1.png"
        ],
        "params": {
            "hair": "red",
            "clothes": "t-shirt, jean",
            "number": 1
        },
        "createdAt": "2023-10-09T11:11:07.174Z"
}

Get result

POST https://telegram.crazyhorse.ai/webhook

Get result when image is generated

Request Body

Name
Type
Description

params

object

These params

hair: string,

pose: string,

body: string,

chest: string,

clothes: string,

background: string,

number: number,

loraId: string,

debug: boolean,

createdAt

string

state

String

string

code

String

request code

image

String

url origin image

generateImageUrls

String[]

url generated images

"success"

Last updated