AI Prompt Generator API

API Endpoint Specifications

  • Endpoint Path: /api/1/ai-prompt-generator
  • Type of Data: JSON & 2/minute
  • Data Source: BUYFROMLO
  • Request Limit: 500 request/month
  • Script & Integration: Code to integrate with cURL, JS, Python, Ruby, Php, Node.js, Java, .NET, Rust, Go, Typescript
AI Prompt Generator API Endpoint Basic Info

API Endpoint Path

required

AI Prompt Generator

api/1/ai-prompt-generator


Call Method

Required

POST

Type of Data Return

JSON

Output structured JSON data on AI prompt templates


Available API Arguments & Parameters

token

required

BUYFROMLO API token. Free and paid subscription APIs are available: /api/3/ai-prompt-generator, and accessible to on-site APP on /app/3/ai-prompt-generator as well

originalBrief

required

Input a image type and several core keywords which are up to 20 and up to 500 English characters. Here are the image type options: Portrait, Interior Design, City View, Animal Photo, Drink Photo, Comicbook, Pixel, Pixar, Food Photo, Anime Character, Nature, Flat, Sticker, Logo, Product Photo, Icon, Fashion, Gradient, Dragon, Vehicle, Character, Character with text, Cartoon with text, Event, Plant Photo, Toy Photo, Cartoon Character, Cyberpunk photoshoot, Drawing, Travel, eCommerce, futuristic, Cinematic art, Cultural art, Urban Architecture


keywords

Optional

Input "no" if you don't have any specific keywords. Or Add some specific keyword that is taken account

negativeprompt

Optional

Input "no" if you don't have any negative prompts. Or Add the negative prompt to enrich the image effect and shape a better dimension if it's applicable


AI Prompt Generator

api/1/ai-prompt-generator


Code Integration and Response

Python Code Sample


import requests

apiendpoint = "https://api.buyfromlo.com/api/1/ai-prompt-generator"

## Required Arguments & Parameters ##

token = "your buyfromlo token"
originalBrief = ""
keywords = ""
## optional arguments and parameters ##
negativeprompt=""

headers={"Authorization": "Bearer " + token}

## Call the api ##
response = requests.post(
    apiendpoint, 
    json={
            "originalBrief": originalBrief, 
            "keywords": keywords,
            "negativeprompt": negativeprompt, 
        }, headers= headers
    )
print(response.status_code)
print(response.json())
                        

JSON Response Sample


{
    "Image Prompt": "",
    "Text Prompt": ""
}