Python
We recommend using the standardrequests library.
JavaScript / Node.js
Use the built-infetch API.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Integrate Apollo AI with your favorite languages
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()
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();
}