Spec Stack

API Documentation

Integrate Spec Stack into your workflows, CI/CD pipelines, and AI agents.

Authentication

All API requests must be authenticated using an API Key. You can generate an API Key in your Settings.

Authorization Header
Authorization: Bearer sk_...
GET
/api/v1/me
Verifies your API key and returns your user ID.

Base URL

All endpoints are prefixed with /api/v1.

Projects

GET
/api/v1/projects
List all projects.
POST
/api/v1/projects
Create a new project.

Request Body

{
  "name": "My Project",
  "description": "Optional description"
}
POST
/api/v1/projects/from-template
Create a new project from a template.

Request Body

{
  "name": "My Marketing Site",
  "templateId": "marketing-site"
}

Collections

GET
/api/v1/collections
List all collections. Optionally filter by projectId.

Query Parameters

  • projectId (optional): Filter by project ID
POST
/api/v1/collections
Create a new collection.

Request Body

{
  "projectId": "uuid...",
  "name": "Design Assets",
  "description": "Optional description"
}
GET
/api/v1/collections/:id/context
Get a formatted text dump of the collection and all its assets, suitable for LLM context injection.

Assets

GET
/api/v1/assets
List all assets. Optionally filter by collectionId.

Query Parameters

  • collectionId (optional): Filter by collection ID
POST
/api/v1/assets
Create a new asset.

For creating markdown, link, or json assets.

{
  "title": "My Spec",
  "type": "markdown", // or "link", "json"
  "content": "# Markdown content...",
  "collectionId": "optional-uuid",
  "isPublic": false
}
GET
/api/v1/assets/:id
Get a specific asset.
PUT
/api/v1/assets/:id
Update an asset.
DELETE
/api/v1/assets/:id
Delete an asset.

Generation

POST
/api/v1/generate
Trigger an AI generator to create new content from existing assets.

Request Body

{
  "generatorId": "summary",
  "collectionId": "uuid...",
  "parameters": {}
}

API Keys

GET
/api/v1/api-keys
List your API keys (hashes only).
POST
/api/v1/api-keys
Create a new API key.

Request Body

{
  "label": "My Key"
}