Image API

AI Image Generator ยท https://hostapi.in/

๐Ÿ”‘ Endpoint

GET /generate

Generates AI images from a given text prompt.

๐Ÿ“Œ Query Parameters

Parameter Type Required Default Description
promptstringโœ…โ€”Text description of the image.
imageintโŒ1Number of images (1โ€“6).
dimensionsstringโŒsquareOptions: square, tall, wide.
safetybooleanโŒtrueEnable or disable NSFW safety filter.

๐Ÿ“ค Example Request

GET https://hostapi.in/generate?prompt=A+cat+on+the+moon&image=2&dimensions=wide&safety=true

๐Ÿ“ฅ Example Response

{
  "images": [
    "https://hostapi.in/images/68d2ae4ceef19.png",
    "https://hostapi.in/images/68d2ae4e9c3e1.png"
  ],
  "Info": "Images auto-delete after 5 minutes",
  "join": "@Qualityapis"
}

โš ๏ธ Error Responses

๐Ÿš€ Usage Examples

JavaScript

fetch("https://hostapi.in/generate?prompt=A+cyberpunk+city&image=3")
  .then(res => res.json())
  .then(data => console.log(data));

PHP

$response = file_get_contents("https://hostapi.in/generate?prompt=A+dog+with+glasses&image=2");
$data = json_decode($response, true);
print_r($data);

Python

import requests

url = "https://hostapi.in/generate"
params = {
    "prompt": "A dragon flying over mountains",
    "image": 2,
    "dimensions": "tall"
}
resp = requests.get(url, params=params)
print(resp.json())