Studio API
The Studio API is the agent-callable half of the SpiderGate Studio. It manages projects (durable containers), sessions (conversations), assets (generated media attached to a project), and saved prompts (named bundles of system prompt, model, settings and reference media that the gateway expands server-side).
All routes are brand-scoped: the brand is resolved from your credential, and there is no cross-brand path.
Base URL and authentication
Base URL |
|
Auth |
|
Also accepts | a dashboard session cookie, or a PAT ( |
Reads | any member of the brand |
Writes | brand admin |
A request with no credential returns 401. An account with no brand returns 409 rather than a 500.
curl -s https://spideriq.ai/api/v1/gate/studio/projects \
-H "Authorization: Bearer $CLIENT_ID:$API_KEY:$API_SECRET"Projects
A project is the container everything else hangs from. Deleting one cascades to its sessions and assets.
POST /projects
Create a project.
Parameter | Type | Required | Notes |
|---|---|---|---|
| string | yes | Display name |
curl -s -X POST https://spideriq.ai/api/v1/gate/studio/projects \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"name": "Caribbean Restaurant Outreach"}'{
"id": "e8ba9776-96a3-499d-bb62-7c281ffb3f66",
"brands_id": 9,
"name": "Caribbean Restaurant Outreach",
"created_by": "cli_hm9o83p0e4t9rjd6",
"created_at": "2026-08-10T08:19:41Z"
}Returns 201.
GET /projects
List the brand's projects, newest-touched first, each with session_count and asset_count. Page with limit (1–200, default 50) and offset.
GET /projects/{project_id}
One project with its sessions and its asset gallery inlined. 404 if the project is not yours.
PATCH /projects/{project_id}
Rename. Body {"name": "…"}.
DELETE /projects/{project_id}
Delete the project and cascade to its sessions and assets. Returns 204.
Sessions
A session is one conversation. A session may carry no project, in which case the dashboard shows it as Scratch.
Method | Path | Purpose |
|---|---|---|
|
| Open a conversation in a project ( |
|
| List sessions |
|
| One session |
|
| Rename |
|
| Delete ( |
Per-message persistence is not part of this API. The composer holds messages client-side; a session records the conversation, not its turns.
Assets
An asset is a generated image, video or audio clip attached to a project. The record stores the media URL, not a copy of the bytes.
POST /projects/{project_id}/assets
Parameter | Type | Required | Notes |
|---|---|---|---|
| string | yes | The stored media URL |
| string | yes |
|
| string | no | |
| uuid | no | Must belong to this project, else |
| object | no | Free-form; the dashboard stores the generation recipe here |
Returns 201. DELETE /projects/{project_id}/assets/{asset_id} unlinks it (204).
Saved prompts
A saved prompt is {system_prompt, model, settings, reference_media_ids} under a name, inside a project.
POST /projects/{project_id}/prompts
Parameter | Type | Required | Notes |
|---|---|---|---|
| string | yes | 1–255 chars. Unique within the project |
| string | no | ≤ 4000 chars |
| string | no | |
| string | no | A task alias or a concrete model id |
| object | no | Saved values: temperature, aspect ratio, seed, voice |
| array | no | ≤ 50 media ids or URLs |
curl -s -X POST https://spideriq.ai/api/v1/gate/studio/projects/$PROJECT_ID/prompts \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{
"name": "Venue Blurb",
"system_prompt": "You write one-paragraph venue descriptions. Plain English, no superlatives.",
"model": "spideriq/creative",
"settings": {"temperature": 0.6, "max_tokens": 400}
}'{
"id": "1ca17cb6-9911-4337-87b5-a8a7f36387b9",
"public_id": "prompt_7382f72b9ee4014a5b23390ce2ed38c5",
"project_id": "e8ba9776-96a3-499d-bb62-7c281ffb3f66",
"name": "Venue Blurb",
"model": "spideriq/creative",
"settings": {"max_tokens": 400, "temperature": 0.6},
"reference_media_ids": [],
"last_used_at": null
}Returns 201, or 409 if the name is already used in this project.
The rest of the prompt surface
Method | Path | Purpose |
|---|---|---|
|
| List a project's prompts |
|
| Search brand-wide by name or description; omit |
|
| Get by |
|
| Partial update. Sending |
|
| Delete ( |
Referencing a saved prompt
Put a reference in the prompt field of a chat or media-generation request and the gateway expands it before dispatch.
Form | Scope | Needs |
|---|---|---|
| resolves anywhere in the brand | no |
| resolves inside one project | yes |
The handle is the prompt's name lowercased, with runs of non-alphanumeric characters collapsed to underscores and leading and trailing underscores stripped. Venue Blurb becomes venue_blurb. An exact name match always beats a slug match.
Overrides win. The stored system prompt, model, settings and reference media fill in only what your request did not set.
curl -s -X POST https://spideriq.ai/api/gate/v1/media/generations \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"model": "fal/flux-dev", "params": {"prompt": "prompt:prompt_7382f72b9ee4014a5b23390ce2ed38c5"}}'Reference errors
A value that parses as a reference and does not resolve is an error. A plain literal never raises one.
Status |
| When |
|---|---|---|
|
|
|
|
| No prompt with that id, or no name or handle match in the project |
|
| A handle matching more than one prompt. The message names every candidate and nothing is chosen |
Infrastructure failures degrade to the literal; only reference errors propagate.
Generating media as an agent
Two Bearer routes on the gateway base, https://spideriq.ai/api/gate/v1:
Method | Path | Purpose |
|---|---|---|
|
| The active media models and the parameters each one declares |
|
| Generate. Body |
Read /media/models before you generate. Each model declares its own inputs, and a parameter that is not declared is dropped before the provider call. A declared parameter with a bad value returns 422 invalid_param naming the field and the accepted values.
Status |
| When |
|---|---|---|
|
| A declared parameter with a value outside its enum or range |
|
| An active model whose provider adapter is not registered |
|
| A model still marked |
|
| The brand has no key for that provider. Media keys are per-brand and never pooled |
|
| The wall-clock cap expired (600s image and speech, 900s video) |
A generation returns the stored media URL plus an est_cost breakdown showing the provider cost, the billed amount and whether the key was yours or ours.