AI Image Generator API

API Endpoint Specifications

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

API Endpoint Path

required

AI Image Generator API

api/1/aiimage


Call Method

Required

POST

Type of Data Return

JSON

Downloadable File Link from the response


Available API Arguments & Parameters

token

required

BUYFROMLO API token. Free and subscription APIs are both available on /api/1/aiimage, and accessible to on-site APP on /app/1/aiimage as well

typeofimage

required

Input an image prompts and it accepts negative prompts

llmmodel

required

FALSE


promptbriefing

Optional

FALSE

positiveprompt

Optional

FALSE

negativeprompt

Optional

FALSE


AI Image Generator API

api/1/aiimage


Code Integration and Response

Python Code Sample


import requests

apiendpoint = "https://api.buyfromlo.com/api/1/aiimage"

## Required Arguments & Parameters ##

token = "your buyfromlo token"
llmmodel = ""
promptbriefing = ""
typeofimage=""

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

## Call the api ##
response = requests.post(apiendpoint, json={"llmmodel": llmmodel, "promptbriefing": promptbriefing, "typeofimage": typeofimage}, headers=headers)
print(response.status_code)
print(response.json())
                        

JSON Response Sample


{
    "Product keyword":"",
    "Title":"",
    "Description":"",
    "Image URL":"",
    "Product Page URL":"",
    "Pricing":"",
    "Review":"",
    "api_module":""
}