STOP WASTING PAID TOKENS. START POOLING ACCOUNTS TODAY. [ GET YOUR VAULT ]

Media Generation

POST /api/gate/v1/media/generations

Generate Media (schema-aware)

Generate an image, video, or audio clip through SpiderGate's adapter-backed, schema-aware pipeline. Unlike `/v1/images + /v1/audio (raw OpenAI passthrough), this honors each model's declared inputs and returns a SpiderMedia-stored URL plus a cost breakdown. Discover models + their tunables via GET /api/gate/v1/media/models`.

Request body

curl -X POST 'https://spideriq.ai/api/gate/v1/media/generations' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "kie/veo-3-fast",
  "params": {
    "prompt": "A spider weaving a gate, cinematic",
    "aspect_ratio": "16:9"
  }
}'
import httpx

resp = httpx.post(
    "https://spideriq.ai/api/gate/v1/media/generations",
    headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
    json={"model": "kie/veo-3-fast", "params": {"prompt": "A spider weaving a gate, cinematic", "aspect_ratio": "16:9"}},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://spideriq.ai/api/gate/v1/media/generations", {
  method: "POST",
  headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" },
  body: JSON.stringify({"model": "kie/veo-3-fast", "params": {"prompt": "A spider weaving a gate, cinematic", "aspect_ratio": "16:9"}})
});
const data = await resp.json();
console.log(data);
package main

import (
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{"model": "kie/veo-3-fast", "params": {"prompt": "A spider weaving a gate, cinematic", "aspect_ratio": "16:9"}}`)
	req, _ := http.NewRequest("POST", "https://spideriq.ai/api/gate/v1/media/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 — Media generated; returns stored URL + cost breakdown

  • 400 — Invalid request

  • 401 — Authentication error

  • 404 — Unknown media model

  • 429 — Rate limit exceeded

  • 500 — Internal error

  • 502 — Provider generation failed

  • 503 — No provider key available for this brand

  • 422 — Validation Error

GET /api/gate/v1/media/models

List Media Models

List the media-generation models an agent can call, each with its declared `inputs schema (the per-model tunables + their type/enum/min/max). This is the discovery surface — read a model's inputs BEFORE calling POST /media/generations` so you only pass params the model accepts (undeclared params are dropped).

Parameters

  • modality (query, any, optional) — Filter to one modality (text-to-image | text-to-video | tts | stt | …).

  • include_inactive (query, boolean, optional) — Also return coming_soon/disabled models (not generatable yet).

curl -X GET 'https://spideriq.ai/api/gate/v1/media/models' \
  -H 'Authorization: Bearer <token>'
import httpx

resp = httpx.get(
    "https://spideriq.ai/api/gate/v1/media/models",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://spideriq.ai/api/gate/v1/media/models", {
  method: "GET",
  headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);
package main

import (
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://spideriq.ai/api/gate/v1/media/models", nil)
	req.Header.Set("Authorization", "Bearer <token>")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}

Responses

  • 200 — Successful Response

  • 422 — Validation Error