Documentation
Generate Icons & Thumbnails

Generate Icons & Thumbnails

Using the API to generate icons and thumbnails

/api/v1/generate-icon-thumbnail
import axios from "axios";
 
interface IconThumbnail {
  id: string;
  prompt: string;
  size: string;
  style: string;
  perspective: string;
  robloxUserId: string;
  quality: string;
  previewUrl: string;
  fullUrl: string;
}
 
interface Response {
  success: boolean;
  data: IconThumbnail[];
}
 
const response = await axios.post<Response>("/api/v1/generate-icon-thumbnail", {
  prompt: "A person with a sword",
  size: "1024x1024", // Icon
  style: "Default", // Default, Cartoon, Realistic
  perspective: "Default", // Default, Close-up, Medium shot, Wide shot
  robloxUserId: "1234567890", // Optional, integrates Roblox characters
  n: 3
}, {
  headers: {
    "x-api-key": "Bearer <your-token>"
  }
});
 
const { data } = response.data;
data.map(({ id, prompt, size, quality, previewUrl, fullUrl }) => {
  console.log(id);
});