API Reference

aiops API Documentation

Generate images, convert text to speech, and transcribe audio using simple REST endpoints. Perfect for n8n, Zapier, Make.com, or any custom integration.

Quick Start

Every user gets an API key automatically. You can find it in your Dashboard → API Keys.

1

Get your API key

Sign in and go to API Keys. Copy your key — it starts with aiops_sk_.

2

Make your first request

Send a POST request with your key in the Authorization header.

curl
curl -X POST https://your-domain.com/api/services/image_gen \
  -H "Authorization: Bearer aiops_sk_xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "a futuristic city at sunset"}'
3

Use the response

The API returns a JSON object with the result URL. For images: image_url. For audio: audio_url.

Authentication

All API requests require an Authorization header with your API key.

Header
Authorization: Bearer aiops_sk_xxxxxxxxxxxxxxxx

Security tip: Never expose your API key in client-side code or public repositories. Use environment variables.

POST/api/services/image_gen5 credits

Generate stunning images from text prompts using FLUX and Stable Diffusion models.

Request body

ParameterTypeDescription
prompt *stringWhat to generate. Be descriptive for best results.
aspect_ratiostring"1:1", "16:9", "9:16", "4:3", "3:4". Default: "1:1"
stylestring"none" or "anime". Default: "none"
modelstring"black-forest-labs/FLUX.1-schnell", "black-forest-labs/FLUX.1-dev", "fal-ai/flux-pro"

Example request

curl
curl -X POST https://your-domain.com/api/services/image_gen \
  -H "Authorization: Bearer aiops_sk_xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "a futuristic cyberpunk city at sunset, neon lights, 8k detail",
    "aspect_ratio": "16:9",
    "style": "none",
    "model": "black-forest-labs/FLUX.1-schnell"
  }'

Response

json
{
  "image_url": "https://cdn.example.com/output/image.webp",
  "success": true
}

Tip: Use aspect_ratio: "1:1" for profile pictures,"9:16" for mobile wallpapers, and "16:9" for desktop backgrounds.

POST/api/services/tts2 credits

Convert any text into natural-sounding speech with multiple voice options.

Request body

ParameterTypeDescription
text *stringText to convert to speech. Max 500 characters per request.
voicestring"en-Carter_man", "en-Emily_woman", "en-James_man", "en-Sarah_woman". Default: "en-Carter_man"
modelstring"vibevoice", "parler-tts/parler-tts-mini-v1". Default: "vibevoice"

Example request

curl
curl -X POST https://your-domain.com/api/services/tts \
  -H "Authorization: Bearer aiops_sk_xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Welcome to the future of AI. Everything you need is just one API call away.",
    "voice": "en-Emily_woman"
  }'

Response

json
{
  "audio_url": "https://cdn.example.com/output/audio.mp3",
  "success": true
}

Voice reference: Carter & James are male voices. Emily & Sarah are female voices. Carter and Emily have a neutral American accent. James is deeper, Sarah is softer.

POST/api/services/transcribe3 credits

Convert audio files to text using Whisper-class models. Supports mp3, wav, and m4a formats.

Request body

ParameterTypeDescription
audio_url *stringDirect public URL to the audio file (mp3, wav, m4a).
languagestring"en", "es", "fr", "de", "it", "ja", "zh". Default: "en"
modelstring"distil-whisper/distil-large-v3", "openai/whisper-large-v3", "meta-llama/seamless-m4t-v2-large"

Example request

curl
curl -X POST https://your-domain.com/api/services/transcribe \
  -H "Authorization: Bearer aiops_sk_xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "audio_url": "https://example.com/podcast-episode.mp3",
    "language": "en",
    "model": "distil-whisper/distil-large-v3"
  }'

Response

json
{
  "text": "Welcome to today's episode. We're going to talk about artificial intelligence and its impact on society.",
  "success": true
}

Note: The audio file must be publicly accessible via a direct URL. If your file is private, upload it to a temporary hosting service first (like tmp.link or catbox.moe).

n8n Integration Guide

Connect aiops to your n8n workflows to automate image generation, voice synthesis, and transcription.

1

Add an HTTP Request node

In n8n, drag an HTTP Request node into your workflow.

2

Configure the request

Set these fields:

FieldValue
MethodPOST
URLhttps://your-domain.com/api/services/image_gen
AuthenticationGeneric Credential Type → Header Auth
NameAuthorization
ValueBearer aiops_sk_xxxxxxxxxxxxxxxx
3

Set the JSON body

Switch the body type to JSON and paste:

json
{
  "prompt": "{{ $json.prompt }}",
  "aspect_ratio": "1:1"
}
4

Use the output

The node returns image_url (or audio_url / text). Access it with {{ $json.image_url }} in the next node.

Pro tip: Create a Credential in n8n with your aiops API key so you can reuse it across multiple workflows without copying the key each time.

Errors & Rate Limits

All errors return a JSON body with an error field. Failed generations are automatically refunded — you never pay for errors.

Error codes

CodeDescription
401Unauthorized — missing or invalid API key
402Insufficient credits — buy more or upgrade your plan
429Rate limit exceeded — slow down or upgrade for higher limits
500Generation failed — credits are automatically refunded

Rate limits by plan

PlanCredits/moRate limitAPI keys
Free505/min1
Starter1,00020/min3
Pro5,000100/min10
Enterprise15,000UnlimitedUnlimited
Error response
{
  "error": "Insufficient credits",
  "credits": 2,
  "cost": 5
}