Development Documents
AI Model API
flux-schnell API Usage Guide
10 min
introduction this document will guide developers on how to use the aonweb library to call the flux schnell api, the fastest image generation model tailored for local development and personal use prerequisites node js environment aonweb library installed valid aonet appid basic usage 1\ import required modules 2\ initialize ai instance 3\ prepare input data example 4\ call the ai model parameter description num outputs number, number of outputs to generate prompt string, prompt for generated image aspect ratio string, aspect ratio for the generated image output format string, format of the output images output quality number,quality when saving the output images, from 0 to 100 100 is best quality, 0 is lowest quality not relevant for png outputs notes the api may take some time to process the input and generate the result, consider implementing appropriate wait or loading states handle possible errors, such as network issues, invalid input, or api limitations example response the api response will contain the url of the generated image or other relevant information parse and use the response data according to the actual api documentation