API Reference
1. generateImage(prompt, model = 'v3', negativePrompt = '')
Description: Generates an image based on the provided prompt.
Parameters:
prompt
(string): The text prompt that describes the desired image.model
(string, optional): The AI model to use for generation (default is'v3'
).negativePrompt
(string, optional): Descriptions of what to avoid in the generated image (e.g., unwanted objects or styles).
Returns: A URL string pointing to the generated image.
Example:
2. askQuestion(content, model = 'v3')
Description: Submits a question or chat content to receive an AI-generated response.
Parameters:
content
(string): The question or content to send to the AI.model
(string, optional): The AI model to use for generating the response (default is'v3'
).
Returns: The AI-generated response (usually an object containing the answer).
Example:
3. checkContent(content)
Description: Checks the provided content against a moderation filter to determine its appropriateness.
Parameters:
content
(string): The text content to be checked for moderation.
Returns: An object containing the moderation result, which typically includes flags for inappropriate content and categories of concern.
Example:
Error Handling
All methods may throw an error if the request fails. Be sure to implement error handling in your code:
The Free AI
package provides powerful tools for image generation, question answering, and content moderation, all easily accessible through its well-defined API. Users can customize their interactions based on their specific needs, ensuring flexibility and utility across various applications.
Last updated