Dizigna API Reference
Dizigna is a service that auto generates AI images.
- You generate an API key in Dizigna
- We turn functions into an API
- You use this API to generate Images
Authentication
Dizigna uses API keys to allow access to the API.
Dizigna expects the API key to be included in all API requests to the server in a header that looks like the following:
Authorization: Bearer API_KEY
All API requests on Dizigna are scoped to a User. Access API Key to view your available keys.
Logo Generator
The Logo Generator API allows you to create custom logos by sending a POST request. The request must include a specific logo style and exactly two elements that represent the design.
The style parameter defines the visual appearance of the logo and can take values such as 'modern', 'watercolor', and others.
The elements parameter is a list of exactly two elements, which describe the key components of the logo.
Once the request is processed, Dizigna will respond with the generated logo in PNG format.
Parameters
- style stringrequired
The logo style that you want to use. Example styles:
'watercolor', 'vintage', 'cartoon', 'geometric', '3d', 'flat', 'badge', 'minimalist', 'abstract', 'negative space', 'line art', 'pop art', 'pixel art', etc. - elements listrequired
A list of elements you want to put in the logo. Each element is a string that
represents an aspect of the design.
- Child Parameters
- element stringrequired Each element in the list must represent an aspect of the logo. Example: ["A cat", "Coffee"]
post | /api/logogen/ |
const url = "https://dizigna.com/api/logogen/";
const API_KEY = "YOUR_API_KEY";
var data = {
"style": "This is logo style",
"elements": ["Main element of the logo", "Secondary element of the logo"],
};
try {
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${API_KEY}`
},
body: JSON.stringify(data)
});
if (!response.ok) {
const errorText = await response.text();
throw new Error(`${response.status}: ${errorText}`);
}
const result = await response.blob();
const file = new File([result], "generated_image.png", { type: result.type });
} catch (error) {
console.error("Error:", error);
}