Welcome to the Neurall API, your gateway to powerful AI-driven media generation, editing, and processing. Whether you're creating stunning visuals, enhancing media, or automating workflows, our API provides the tools you need to bring your ideas to life.
The Neurall API is designed for seamless integration and high performance. To begin, make sure to follow these key requirements:
Base URL: All API requests should be directed to: https://api.neurall.io
Secure Communication: All requests must be made over HTTPS. Any attempt to use plain HTTP will result in failure.
Authentication: Every request requires an API Key for authorization. You can manage API Keys in the Neurall app by navigating to Projects → API Keys.
By default, each organization is limited to 100 concurrent API requests. This ensures optimal performance and reliability for all users. If your use case requires a higher concurrency limit, please contact our support team at support@neurall.io to request an increase.
All additional requests beyond this limit will return a 429 Too Many Requests error.
https://api.neurall.io/v1/images/generation
const axios = require('axios');
const fs = require('fs');
const FormData = require('form-data');
// Create form data
const form = new FormData();
form.append('prompt', '{{PROMPT}}');
form.append('negative_prompt', '{{NEGATIVE_PROMPT}}');
form.append('width', '{{WIDTH}}');
form.append('height', '{{HEIGHT}}');
// Make request
axios.post('https://api.neurall.io/v1/images/generation', form, {
headers: {
...form.getHeaders(),
authorization: '{{YOUR_API_KEY_HERE}}'
},
responseType: 'arraybuffer' // Expecting binary response
}).then((response) => {
fs.writeFileSync('output.png', response.data);
console.log('Image received and saved as output.png');
}).catch((err) => {
console.error('Error in request: ', err);
})
The desired height of the image, which must be between 512 and 1024 pixels.
The ID of a trained identity to be used with the identity-preserving feature. The identity must first be trained using the Pegasus training endpoint.
https://api.neurall.io/v1/images/pegasus-generation
const axios = require('axios');
const fs = require('fs');
const FormData = require('form-data');
// Create form data
const form = new FormData();
form.append('prompt', '{{PROMPT}}');
form.append('width', '{{WIDTH}}');
form.append('height', '{{HEIGHT}}');
// Make request
axios.post('https://api.neurall.io/v1/images/pegasus-generation', form, {
headers: {
...form.getHeaders(),
authorization: '{{YOUR_API_KEY_HERE}}'
},
responseType: 'arraybuffer' // Expecting binary response
}).then((response) => {
fs.writeFileSync('output.png', response.data);
console.log('Image received and saved as output.png');
}).catch((err) => {
console.error('Error in request: ', err);
})
The image containing the face to be transferred. Maximum size is 30MB, and resolution must not exceed 16 Megapixels.
The image onto which the source face will be applied. Must match file size and resolution limits 30MB and 16 Megapixels.
An optional image that defines the specific facial region to be swapped. White areas indicate regions to include in the swap, while black areas are excluded. The mask image must have the same dimensions as the target image and must not exceed 30MB. When a mask is provided, the target_face_x
and target_face_y
parameters are ignored. This feature supports swapping only one face at a time.
X-coordinate on the target image indicating the approximate center point of the face. Useful when multiple faces are present.
https://api.neurall.io/v1/images/face-swapping
const axios = require('axios');
const fs = require('fs');
const FormData = require('form-data');
// Create form data
const form = new FormData();
form.append('source', fs.createReadStream('path/to/source.png'));
form.append('target', fs.createReadStream('path/to/target.png'));
form.append('mask', fs.createReadStream('path/to/mask.png'));
// Make request
axios.post('https://api.neurall.io/v1/images/face-swapping', form, {
headers: {
...form.getHeaders(),
authorization: '{{YOUR_API_KEY_HERE}}'
},
responseType: 'arraybuffer' // Expecting binary response
}).then((response) => {
fs.writeFileSync('output.png', response.data);
console.log('Image received and saved as output.png');
}).catch((err) => {
console.error('Error in request: ', err);
})
Performs generative fill on the specified masked area of the provided image using a natural language prompt. The API takes an input image, a mask image (where white areas define the region to fill), and a text prompt describing what should be generated in the masked region. The result is a high-quality image with the masked area seamlessly filled according to the prompt.
The image to be edited. Maximum size is 30MB, and resolution must not exceed 16 Megapixels.
An optional image that defines the specific area to be altered. White areas indicate regions to include in the swap, while black areas are excluded. The mask image must have the same dimensions as the target image and must not exceed 30MB.
https://api.neurall.io/v1/images/generative-fill
const axios = require('axios');
const fs = require('fs');
const FormData = require('form-data');
// Create form data
const form = new FormData();
form.append('image', fs.createReadStream('path/to/image.png'));
form.append('mask', fs.createReadStream('path/to/mask.png'));
form.append('prompt', '{{PROMPT}}');
// Make request
axios.post('https://api.neurall.io/v1/images/generative-fill', form, {
headers: {
...form.getHeaders(),
authorization: '{{YOUR_API_KEY_HERE}}'
},
responseType: 'arraybuffer' // Expecting binary response
}).then((response) => {
fs.writeFileSync('output.png', response.data);
console.log('Image received and saved as output.png');
}).catch((err) => {
console.error('Error in request: ', err);
})
The Reimagine endpoint generates high-quality visual variations of an input image while preserving its core structure, layout, and composition. It outputs an image with the same aspect ratio as the source and renders it at up to 1 Megapixel resolution. This is ideal for creating new versions of a photo with subtle or creative differences, without losing the original identity.
The base image to be reimagined. Supported formats include JPEG, PNG, and WebP. The file size must not exceed 30MB, and the resolution must not exceed 16 Megapixels.
https://api.neurall.io/v1/images/reimagine
const axios = require('axios');
const fs = require('fs');
const FormData = require('form-data');
// Create form data
const form = new FormData();
form.append('image', fs.createReadStream('path/to/image.png'));
form.append('denoise', '{{DENOISE}}')
// Make request
axios.post('https://api.neurall.io/v1/images/reimagine', form, {
headers: {
...form.getHeaders(),
authorization: '{{YOUR_API_KEY_HERE}}'
},
responseType: 'arraybuffer' // Expecting binary response
}).then((response) => {
fs.writeFileSync('output.png', response.data);
console.log('Image received and saved as output.png');
}).catch((err) => {
console.error('Error in request: ', err);
})
https://api.neurall.io/v1/images/upscaling
const axios = require('axios');
const fs = require('fs');
const FormData = require('form-data');
// Create form data
const form = new FormData();
form.append('image', fs.createReadStream('path/to/image.png'));
// Make request
axios.post('https://api.neurall.io/v1/images/upscaling', form, {
headers: {
...form.getHeaders(),
authorization: '{{YOUR_API_KEY_HERE}}'
},
responseType: 'arraybuffer' // Expecting binary response
}).then((response) => {
fs.writeFileSync('output.png', response.data);
console.log('Image received and saved as output.png');
}).catch((err) => {
console.error('Error in request: ', err);
})
The input image in JPEG, PNG, or WebP format. The file must not exceed 30MB in size or 16 Megapixels in resolution.
The mask image in JPEG, PNG, or WebP format. The mask must have the same resolution as the input image. It should be a black-and-white image where white areas indicate the regions to be removed and replaced. The file must not exceed 30MB in size or 16 Megapixels in resolution.
https://api.neurall.io/v1/images/object-removal
const axios = require('axios');
const fs = require('fs');
const FormData = require('form-data');
// Create form data
const form = new FormData();
form.append('image', fs.createReadStream('path/to/image.png'));
form.append('mask', fs.createReadStream('path/to/mask.png'));
// Make request
axios.post('https://api.neurall.io/v1/images/object-removal', form, {
headers: {
...form.getHeaders(),
authorization: '{{YOUR_API_KEY_HERE}}'
},
responseType: 'arraybuffer' // Expecting binary response
}).then((response) => {
fs.writeFileSync('output.png', response.data);
console.log('Image received and saved as output.png');
}).catch((err) => {
console.error('Error in request: ', err);
})
The input image in JPEG, PNG, or WebP format. The file size must not exceed 30MB, and the resolution (including the extended content) must remain under 16 Megapixels.
https://api.neurall.io/v1/images/extension
const axios = require('axios');
const fs = require('fs');
const FormData = require('form-data');
// Create form data
const form = new FormData();
form.append('image', fs.createReadStream('path/to/image.png'));
form.append('top', '{{TOP}}')
form.append('bottom', '{{BOTTOM}}')
form.append('left', '{{LEFT}}')
form.append('right', '{{RIGHT}}')
// Make request
axios.post('https://api.neurall.io/v1/images/extension', form, {
headers: {
...form.getHeaders(),
authorization: '{{YOUR_API_KEY_HERE}}'
},
responseType: 'arraybuffer' // Expecting binary response
}).then((response) => {
fs.writeFileSync('output.png', response.data);
console.log('Image received and saved as output.png');
}).catch((err) => {
console.error('Error in request: ', err);
})
https://api.neurall.io/v1/images/text-removal
const axios = require('axios');
const fs = require('fs');
const FormData = require('form-data');
// Create form data
const form = new FormData();
form.append('image', fs.createReadStream('path/to/image.png'));
// Make request
axios.post('https://api.neurall.io/v1/images/text-removal', form, {
headers: {
...form.getHeaders(),
authorization: '{{YOUR_API_KEY_HERE}}'
},
responseType: 'arraybuffer' // Expecting binary response
}).then((response) => {
fs.writeFileSync('output.png', response.data);
console.log('Image received and saved as output.png');
}).catch((response) => {
console.error('Error in request: ', err);
})
The input image in JPEG, PNG, or WebP format. The file must not exceed 30MB in size or 25 Megapixels in resolution.
https://api.neurall.io/v1/images/background-removal
const axios = require('axios');
const fs = require('fs');
const FormData = require('form-data');
// Create form data
const form = new FormData();
form.append('image', fs.createReadStream('path/to/image.png'));
// Make request
axios.post('https://api.neurall.io/v1/images/background-removal', form, {
headers: {
...form.getHeaders(),
authorization: '{{YOUR_API_KEY_HERE}}'
},
responseType: 'arraybuffer' // Expecting binary response
}).then((response) => {
fs.writeFileSync('output.png', response.data);
console.log('Image received and saved as output.png');
}).catch((err) => {
console.error('Error in request: ', err);
})
The AI Cloning section provides endpoints for training and managing AI-generated clones of subjects. Using a set of images, you can train an AI Cloning model to replicate a subject's appearance.
Once the training is complete, generate new images by calling /v1/images/pegasus-generation and passing the identity_id parameter in the request.