Skip to main content
Apollo AI’s API is compatible with standard HTTP clients. While we do not essentially require a custom SDK, you can easily use standard libraries.

Python

We recommend using the standard requests library.
pip install requests
import requests

PROMPT_URL = "https://apolloai.lol/v1/generation/prompt"
IMAGE_URL = "https://apolloai.lol/v1/generation/image"

def generate_text(prompt, api_key):
    headers = {"x-api-key": api_key}
    data = {"prompt": prompt}
    return requests.post(PROMPT_URL, headers=headers, json=data).json()

JavaScript / Node.js

Use the built-in fetch API.
async function generateImage(prompt, apiKey) {
  const response = await fetch("https://apolloai.lol/v1/generation/image?model=titan", {
    method: "POST",
    headers: { 
        "x-api-key": apiKey,
        "Content-Type": "application/json"
    },
    body: JSON.stringify({ prompt, size: "1024x1024" })
  });
  return await response.json();
}