RBLX/ai
CommunityPricingBlog1Docs

Getting Started

IntroductionExamplesChangelog

Guide

Best Results

API

IntroductionGet Image OperationGenerate Icons & ThumbnailsGenerate Vector IconsGenerate LogosCommunity GraphicsGraphicsAccount

RBLX/ai

RBLX/ai is designed to help you create high-quality & engaging Roblox graphics with ease and simplicity.

Made with ❤️ by Arxk. For Roblox

General

CommunityPricingBlog

Support

Contact UsDiscordDocs

Legal

Terms of UsePrivacy PolicyImage Rules

Extra

ReferralsCreditsRobots

Copyright ©2024 RBLX/ai. All Rights Reserved.

|DiscordTwitter
Documentation
Get Image Operation

Get Image Operation

Using the API to get the operation of an image

When you call the API to generate a graphic, you will want to poll the operation to check if it is completed.

/api/v1/get-image-operation
import axios from "axios";
 
interface Graphic {
  id: string;
  type: string;
  status: string;
  prompt: string;
  previewUrl: string;
  fullUrl: string;
  vectorFullUrlWithBG: string;
}
 
interface Response {
  success: boolean;
  data: {
    status: string;
    images: Graphic[];
  };
}
 
const baseUrl = new URL("/api/v1/get-image-operation", window.location.origin);
baseUrl.searchParams.set("operationId", "1234567890");
 
const response = await axios.get<Response>(baseUrl.toString(), {
  headers: {
    "x-api-key": "Bearer <your-token>",
  },
});
 
const { data } = response.data;
console.log(data);