v1.0.0
OpenAPI 3.1.0

Sparti API

Two entry points, one key.

Sparti Gateway — an OpenAI-compatible API at /api/sparti/llm/v1. Point any OpenAI SDK, editor or agent framework at it: set the base URL below and use a Sparti key where the client asks for an OpenAI key.

MCP — the Model Context Protocol endpoint at /mcp, so an agent can call Sparti skills as tools. app.sparti.ai/mcp is the canonical public address; this host serves the same endpoint.

Authentication

A workspace API key, sk_live_…, minted in the app under Connectors → Sparti → Sparti Gateway. Send it as Authorization: Bearer sk_live_….

Every other path on this host is private: it answers the app and the background services, and returns 404 to a browser.

Models

  • sparti-free — free routers only.
  • sparti-auto — the workspace's own routing: free first, then the session's model, then a paid model when the workspace allows it.
  • Any concrete model id returned by GET /v1/models.

Optional attribution headers: x-sparti-brand-id (bill and scope the call to one brand) and x-sparti-client-model (the model your client is running).

Server:https://api.sparti.ai

Live

Client Libraries

Core (v1)

​

The versioned surface. /api/v1/manifest is the one bootstrap call: who the caller is, which brands they can act on, and the features they may run.

What this caller may render: identity, workspace, brands, plan, the features granted to it, and which server (plane) answers for its workspace.

​

Responses

  • application/json
  • Authentication required

Request Example for get/api/v1/manifest
curl https://api.sparti.ai/api/v1/manifest \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "api": {
    "version": "string",
    "docs": "string"
  },
  "identity": {
    "userId": null,
    "email": null,
    "kind": "user",
    "isAdmin": true
  },
  "workspace": {
    "id": "string",
    "name": "string",
    "role": null
  },
  "brands": [
    {
      "id": "string",
      "name": "string"
    }
  ],
  "billing": null,
  "runtime": {
    "plane": "master",
    "api_base": "https://example.com",
    "mcp_url": "https://example.com",
    "box": {
      "label": null,
      "host": "string",
      "ip": null,
      "region": null,
      "plan": null
    },
    "degraded": true
  },
  "capabilities": {
    "scope": "string",
    "clusters": [
      "string"
    ]
  },
  "features": [
    {
      "name": "string",
      "cluster": "string",
      "summary": "string"
    }
  ],
  "endpoints": [
    {
      "method": "string",
      "path": "string",
      "summary": "string"
    }
  ]
}

Every brand the caller can act on.

​

Responses

  • application/json
  • Authentication required

Request Example for get/api/v1/brands
curl https://api.sparti.ai/api/v1/brands \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "brands": [
    {}
  ]
}

Every workspace the caller belongs to, with role and counts.

​

Responses

  • application/json
  • Authentication required

Request Example for get/api/v1/workspaces
curl https://api.sparti.ai/api/v1/workspaces \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "workspaces": [
    {}
  ]
}

The features (skills) this caller may run, with their input schema.

​

Responses

  • application/json
  • Authentication required

Request Example for get/api/v1/features
curl https://api.sparti.ai/api/v1/features \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "features": [
    {
      "name": "string",
      "summary": "string",
      "cluster": "string",
      "parameters": {}
    }
  ]
}

Run one feature by name. Same handler as /api/sparti/skills/dispatch.

​

Path Parameters

Body

required
application/json
  • Feature arguments (see /features).

Responses

  • application/json
  • Authentication required

Request Example for post/api/v1/features/{name}/run
curl 'https://api.sparti.ai/api/v1/features/{name}/run' \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "args": {},
  "brand_id": "",
  "workspace_id": "",
  "project_id": "",
  "conversation_id": ""
}'
{}

Agent chat over Server-Sent Events: token, tool_call, tool_result, done.

​

Body

required
application/json

Responses

  • application/json
  • Authentication required

Request Example for post/api/v1/chat/stream
curl https://api.sparti.ai/api/v1/chat/stream \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "message": "",
  "conversation_id": "",
  "brand_id": "",
  "workspace_id": "",
  "agent_id": ""
}'
string

Upload bytes (raw body or multipart) and get a stored asset back.

​

Body

required
application/json

Responses

  • application/json
  • Authentication required

Request Example for post/api/v1/uploads
curl https://api.sparti.ai/api/v1/uploads \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "filename": "",
  "content_type": ""
}'
{
  "url": "string"
}

List tasks through the SAME tasks_list handler /mcp tools/call runs (QA-1 one-path slice). Auth: the signed tenant assertion the MCP service door verifies, sent as Bearer — or the normal v1 user door (sk_live_ key, Supabase JWT, session cookie).

​

Query Parameters

  • values
    urgenthighmediumlow

Responses

  • application/json
  • Authentication required

Request Example for get/api/v1/tasks
curl https://api.sparti.ai/api/v1/tasks \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "success": true,
  "tasks": [
    {}
  ],
  "count": 1,
  "scope": "string",
  "message": "string"
}

Gateway (Collapsed)

​

MCP (Collapsed)

​

Model Context Protocol — JSON-RPC over HTTP.

MCP Operations

Models