Quick Start
Get your API keys
Make your first request
Generate new images
Headers
Name
Type
Description
Request Body
Name
Type
Description
Last updated
Last updated
{
"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
}
}{
"message": "API key does not exist",
"errorCode": 5001,
"statusCode": 403,
"path": "/v1/generations",
"error": true,
"method": "POST"
}// 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)