Sentient AI
Information
Sentient AI Image Endpoint
Image endpoint are used to generate images from a single text prompt.
Chat endpoint uses the Image Generation models to process requests and generate images accordingly. Image generation models are diffusion based models that generate images ranging from 768x768 pixels upto 3840x3840 pixels in flexible aspect ratio.
Base64 responses are provided as a fallback when the API is unable to connect to Flubel's image hosting service. This is intended as a temporary solution to ensure uninterrupted access to generated images.
*Note: Higher image resolution results in longer time for image generation.
Base64 responses are provided as a fallback when the API is unable to connect to Flubel's image hosting service. This is intended as a temporary solution to ensure uninterrupted access to generated images.
*Note: Higher image resolution results in longer time for image generation.
Endpoint structure
Base URL
https://dev.flubel.com/api/v1/img
Image Generation
Status: Active
Method: POST
https://dev.flubel.com/api/v1/img
Parameters
To make the request it is essential to include the parameters in body of the reuest. The are two types of parameters:
Required Parameters
Parameter | Description | Value |
---|---|---|
model | Specifies the AI model to use (e.g, sentig ) | String |
prompt | A string that describes the image to be generated by the model. | String |
aspect_ratio | Array containing width and height propertied for image generation. | Array |
seed | A random integer used to bias the image generation. | Integer |
1. Image Generation
Code
index.js
const fetch = require('node-fetch');
fetch('https://dev.flubel.com/api/v1/img', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ',
},
body: JSON.stringify({
model: 'sentig',
prompt: 'A futuristic cityscape with flying cars and neon lights',
aspect_ratio: {
width: 1366,
height: 768
},
seed: 2316846351
})
})
.then(res => res.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Response (URL)
URL
BASE64
JSON
jsCode
jsCode
Image Generated Preview
PreviousChat Endpoint
NextAPI Keys
On this Page
Image Endpoint
Endpoint Structure
Base URL
Image Generation
Parameters
Required Parameters
1. Image Generation
Code
Response (URL/BASE64)
Image Generated Preview