Welcome to Aqua
Aqua is the #1 AI image generation API.
Documentation
/api/getimage?prompt=your_prompt &key=api_key
your_prompt Replace this with your prompt.
api_key Replace this with your API key.
Once complete, it will return a base64 string, which you must convert into an image, as shown in the examples below. If the image is black, it was likely detected as NSFW content.
Examples
Python
import requests
import base64
from PIL import Image
import io
def generate(prompt, api_key):
url = f"https://aqua-ai.xyz/api/getimage?prompt={prompt}?key={api_key}"
response = requests.get(url)
encoded_data = response.text
decoded_data = base64.b64decode(encoded_data)
image = Image.open(io.BytesIO(decoded_data))
image.save("image.png" )
C#
using System;
using System.Net.Http;
using System.IO;
using System.Drawing;
using System.Drawing.Imaging;
void generate(string prompt, string api_key)
{
string url = $"https://aqua-ai.xyz/api/getimage?prompt={prompt}&key={api_key}" ;
using (HttpClient client = new HttpClient())
{
using (HttpResponseMessage response = await client.GetAsync(url))
{
using (HttpContent content = response.Content)
{
string encoded_data = await content.ReadAsStringAsync();
byte[] decoded_data = Convert.FromBase64String(encoded_data);
using (MemoryStream memoryStream = new MemoryStream(decoded_data))
{
using (var image = Image.FromStream(memoryStream))
{
image.Save("image.png" , ImageFormat.Png);
}
}
}
}
}
}
Get an API key
Purchase | £7.50