Quick Start
Get your API keys
Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.
You can generate an API key from your Dashboard at any time.
Make your first request
To make your first request, send an authenticated request to the generate endpoint. This will create a generations, which is nice.
Generate new images
POST
https://api.crazyhorse.ai/v1/generations
Generate new images by your purpose
Headers
Name
Type
Description
api-key*
String
api key
Request Body
Name
Type
Description
params*
object
These params
hair
: string,
pose
: string,
body
: string,
chest
: string,
clothes
: string,
background
: string,
number
: number,
girlId
: string,
loraId
: string (model),
debug
: boolean,
image*
string
base64
{
"state": "WAITING",
"code": "string",
"imageUrls": [
"string"
],
"params": {
"hair": "string",
"pose": "string",
"body": "string",
"chest": "string",
"clothes": "string",
"background": "string",
"number": 10,
"loraId": "string",
"debug": true
}
}
Take a look at how you might call this method using our official libraries, or via node
:
// require the axios module and set it up with your API key
const axios = require('axios').default;
const url = 'https://api.crazyhorse.ai/v1/generations';
const payload = {
params: {
"hair": "red",
"pose": "",
"body": "",
"chest": "",
"clothes": "t-shirt, jean",
"background": "ocean",
"number": 10,
"girlId": "yuna-jp",
"loraId": "115728",
"debug": true
},
image: '/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxISEhUTEBIVFRUVFRUVFRUVFRUVFRYVFxcXFxUVFRUYHSggGBolHRUVITEhJSkrLi4uFx8zODMsNygtLisBCgoKDg0OGhAQGy0dHx0tLS0tLS0tLSstLS0tLS0tLSstKy0xLS0tKy0rLS0tLS0tKy0rKy0tLS0tLS0tLS0tLf/AABEIARMAtwMBIgACEQEDEQH/xAAcAAABBQEBAQAAAAAAAAAAAAAEAQIDBQYABwj/xAA/EAABAwIDBQUFBQgBBQEAAAABAAIRAyEEBTESQVFxgQYTImGRMqGxwdEHQlJichQjgpKy4fDxwhUzU5OiJP/EABkBAAMBAQEAAAAAAAAAAAAAAAABAgMEBf/EACERAQEAAgMAAgIDAAAAAAAAAAABAhEDITESQTJRBHHB/9oADAMBAAIRAxEAPwDSU/Y6KJgUwHg6KNgWSxdIWRYCHpDRFDR'
};
const options = {
headers: {
'api-key': 'xxxxxxxx'
}
};
const genImage = away axios.post(url, payload, options)
Last updated