Images & Audio
POST /api/gate/v1/images/generations
Generate Images
Create one or more images from a text prompt. OpenAI-compatible — drop-in for the `openai Python SDK by setting base_url='https://spideriq.ai/api/gate/v1'. Uses an OpenAI sk-...` key from the SpiderGate pool (brand-scoped first, then shared pool fallback). Per-call billed against that OpenAI account.
Request body
curl -X POST 'https://spideriq.ai/api/gate/v1/images/generations' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"model": "dall-e-3",
"prompt": "A spider weaving a gate, cinematic lighting",
"n": 1,
"size": "1024x1024"
}'import httpx
resp = httpx.post(
"https://spideriq.ai/api/gate/v1/images/generations",
headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
json={"model": "dall-e-3", "prompt": "A spider weaving a gate, cinematic lighting", "n": 1, "size": "1024x1024"},
)
resp.raise_for_status()
print(resp.json())const resp = await fetch("https://spideriq.ai/api/gate/v1/images/generations", {
method: "POST",
headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" },
body: JSON.stringify({"model": "dall-e-3", "prompt": "A spider weaving a gate, cinematic lighting", "n": 1, "size": "1024x1024"})
});
const data = await resp.json();
console.log(data);package main
import (
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{"model": "dall-e-3", "prompt": "A spider weaving a gate, cinematic lighting", "n": 1, "size": "1024x1024"}`)
req, _ := http.NewRequest("POST", "https://spideriq.ai/api/gate/v1/images/generations", body)
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}Responses
200— Successful image generation400— Invalid request401— Authentication error429— Rate limit exceeded500— Internal error503— No OpenAI key available in the pool422— Validation Error
POST /api/gate/v1/audio/speech
Generate Speech (TTS)
Synthesise speech from text using an OpenAI TTS model. Streams the audio bytes back in the requested format (mp3 default). OpenAI-compatible — drop-in for the `openai SDK's audio.speech.create with base_url='https://spideriq.ai/api/gate/v1'`.
Request body
curl -X POST 'https://spideriq.ai/api/gate/v1/audio/speech' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"model": "tts-1",
"voice": "alloy",
"input": "Your agents are running."
}'import httpx
resp = httpx.post(
"https://spideriq.ai/api/gate/v1/audio/speech",
headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
json={"model": "tts-1", "voice": "alloy", "input": "Your agents are running."},
)
resp.raise_for_status()
print(resp.json())const resp = await fetch("https://spideriq.ai/api/gate/v1/audio/speech", {
method: "POST",
headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" },
body: JSON.stringify({"model": "tts-1", "voice": "alloy", "input": "Your agents are running."})
});
const data = await resp.json();
console.log(data);package main
import (
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{"model": "tts-1", "voice": "alloy", "input": "Your agents are running."}`)
req, _ := http.NewRequest("POST", "https://spideriq.ai/api/gate/v1/audio/speech", body)
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}Responses
200— Audio bytes in the requested format400— Invalid request401— Authentication error429— Rate limit exceeded500— Internal error503— No OpenAI key available in the pool422— Validation Error
POST /api/gate/v1/audio/transcriptions
Transcribe Audio (STT)
Transcribe audio to text using OpenAI's Whisper (or gpt-4o-transcribe / gpt-4o-mini-transcribe). Accepts `multipart/form-data with a file field — same shape as openai.Audio.transcriptions.create(). Drop-in for the openai SDK with base_url='https://spideriq.ai/api/gate/v1'`.
Request body
curl -X POST 'https://spideriq.ai/api/gate/v1/audio/transcriptions' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"file": "string",
"model": "string",
"language": "string",
"prompt": "string",
"response_format": "string",
"temperature": 0.0
}'import httpx
resp = httpx.post(
"https://spideriq.ai/api/gate/v1/audio/transcriptions",
headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
json={"file": "string", "model": "string", "language": "string", "prompt": "string", "response_format": "string", "temperature": 0.0},
)
resp.raise_for_status()
print(resp.json())const resp = await fetch("https://spideriq.ai/api/gate/v1/audio/transcriptions", {
method: "POST",
headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" },
body: JSON.stringify({"file": "string", "model": "string", "language": "string", "prompt": "string", "response_format": "string", "temperature": 0.0})
});
const data = await resp.json();
console.log(data);package main
import (
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{"file": "string", "model": "string", "language": "string", "prompt": "string", "response_format": "string", "temperature": 0.0}`)
req, _ := http.NewRequest("POST", "https://spideriq.ai/api/gate/v1/audio/transcriptions", body)
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}Responses
200— Successful transcription400— Invalid request401— Authentication error413— File too large429— Rate limit exceeded500— Internal error503— No OpenAI key available in the pool422— Validation Error