API Reference

Silicofeller Quantum Studio exposes a JSON REST API that the web app, the hosted MCP server and your own scripts all use. This page covers the conventions every endpoint shares: the base URL, authentication, live-reload events, optimistic concurrency, errors, rate limits and pagination. The pages listed at the end document each endpoint group.

Base URL

All public endpoints live under /api on https://silicofeller.com (for example, https://silicofeller.com/api/projects). The reverse proxy forwards /api/, /api/ws/ (WebSockets) and the OAuth discovery documents to the backend.

Request and response bodies are JSON unless an endpoint says otherwise: POST /api/auth/token takes a form body, artifact and GDS downloads return files, and the event stream is Server-Sent Events. Timestamps are ISO 8601 in UTC, usually with a trailing Z.

Authentication

Almost every endpoint requires a bearer token in the Authorization header. The exceptions are registration, login and password reset, public configuration, share-link resolution, the OAuth endpoints, the health probes and a few stateless calculators that the group pages mark as “No token”. Three kinds of token are accepted.

Token

How you get it

What it can call

Session JWT

POST /api/auth/token (email and password), POST /api/auth/google or the GitHub flow under /api/auth/github/*.

Every endpoint your role and plan allow.

Personal MCP token (sfmcp_...)

Created in Design Copilot & MCP > Connect Claude or with POST /api/mcp/tokens.

Only the MCP allow-list below.

OAuth access token (sfmcp_oat_...)

OAuth 2.1 authorization code flow with PKCE, run by Claude connectors.

Only the MCP allow-list below.

Session JWTs

POST /api/auth/token takes an application/x-www-form-urlencoded body with username (the email address) and password, and returns:

{
  "access_token": "<jwt>",
  "token_type": "bearer",
  "user": {"id": "...", "email": "...", "name": "...", "plan": "pro"}
}

A JWT expires after 1440 minutes (access_token_expire_minutes). Each JWT also belongs to a server-side session: a session idle for more than 30 minutes is revoked, and an account has one active session at a time. Logging in while another session is active returns 409 with "code": "ACTIVE_SESSION_EXISTS"; repeat the request with terminate_other_sessions=true to end the other session. Requests made with a revoked session return 401 with "code": "SESSION_REVOKED" or "USER_LOGGED_OUT". A suspended account receives 403 with "code": "ACCOUNT_SUSPENDED" on every call.

curl -s -X POST https://silicofeller.com/api/auth/token \
  -d "username=engineer@example.com" -d "password=$SF_PASSWORD"

curl -s https://silicofeller.com/api/projects \
  -H "Authorization: Bearer $SF_JWT"

Personal MCP tokens

MCP tokens start with sfmcp_ and are meant for the Quantum Studio MCP server, not as general API keys. Send them in the Authorization header; a token in the ?token= query string is rejected with 401 MCP_TOKEN_IN_URL. On every call the backend checks, in order: the token exists, is not revoked, has not expired, the user is active, the method and path are on the allow-list, the per-user rate limit, and that the user’s plan is still eligible.

MCP access is open to every plan by default (MCP_ALLOW_FREE=true). When an operator sets it to false, only Basic, Pro and Enterprise users (and admins) are eligible, and other users receive 403 MCP_PLAN_REQUIRED. New tokens default to 90 days of validity (mcp_token_default_expiry_days).

An MCP token may call exactly these routes. Anything else returns 403 MCP_TOKEN_SCOPE; the token-management routes under /api/mcp/ (other than whoami) and all /api/oauth/ routes return 403 MCP_TOKEN_NOT_ALLOWED.

Method

Path

GET

/api/auth/me

GET, POST

/api/projects

GET, PATCH, DELETE

/api/projects/{id}

POST

/api/projects/{id}/save-design

POST

/api/generate/frequency-plan, /api/generate/metal-code, /api/generate/geometry-check, /api/generate/size-to-plan, /api/generate/yield-estimate, /api/generate/choose-targets

POST

/api/bridge/design/validate, /api/bridge/design/verify-layout, /api/bridge/design/export-design-gds

POST

/api/simulations/run, /api/simulations/{id}/cancel

GET

/api/simulations, /api/simulations/{id}, /api/simulations/{id}/status, /api/simulations/{id}/results

GET

/api/mcp/whoami

A design saved with an MCP token is always recorded in Version History as a claude version. See Auth and Account for the token endpoints.

OAuth 2.1 for connectors

Claude connectors (claude.ai and Claude Code) authenticate to the hosted MCP server at https://silicofeller.com/mcp with OAuth 2.1. Quantum Studio is the authorization server:

  • Discovery: GET /.well-known/oauth-authorization-server (also GET /api/oauth/metadata). OpenID Connect discovery is not supported.

  • Dynamic client registration (RFC 7591): POST /api/oauth/register.

  • Authorization code grant with PKCE S256 only; the consent page is the web route /oauth/authorize.

  • POST /api/oauth/token accepts the authorization_code and refresh_token grants. Refresh tokens rotate.

  • The only scope is mcp.

Access tokens (sfmcp_oat_...) live 3600 seconds, refresh tokens (sfmcp_ort_...) 30 days and authorization codes 600 seconds. OAuth access tokens are enforced exactly like personal MCP tokens, including the allow-list and rate limit. Changing or resetting your password revokes every MCP token, OAuth token and unused authorization code you hold.

Live reload and the X-Client-Id header

Every successful save-design and Version History restore publishes a design_saved event to the project’s collaboration channel. Open editors receive it over the project WebSocket (/api/ws/collab/{project_id}) and re-read the project. The event is a pointer, not the design:

{
  "type": "design_saved",
  "project_id": "4f6c0d2e-...",
  "user_id": "...",
  "user_name": "...",
  "num_qubits": 8,
  "topology": "grid",
  "updated_at": "2026-11-14T09:12:44.512031Z",
  "origin_client_id": "tab-7f3a"
}

Send an X-Client-Id header (any value unique to your client or tab; the first 64 characters are kept) on save-design and restore. It comes back as origin_client_id so a client can ignore the echo of its own save. Saves also push a PROJECTS_UPDATED event to the workspace and user Server-Sent Events stream (/api/events/stream), which dashboards use to refresh project lists. See Workspaces and Collaboration for tickets and the WebSocket.

Optimistic concurrency

POST /api/projects/{id}/save-design supports optimistic concurrency. Read the project with GET /api/projects/{id} (or the cheaper GET /api/projects/{id}/design-version), then send the updated_at value you received back as base_updated_at in the save body. If anyone saved in between, the save is refused with 409:

{
  "detail": {
    "code": "DESIGN_CONFLICT",
    "message": "The design changed since it was read. Read it again and retry.",
    "updated_at": "2026-11-14T09:12:44.512031Z"
  }
}

Re-read the design, re-apply your change and save again with the new updated_at. A base_updated_at that is not a timestamp in the format the API returned gives 422 INVALID_BASE_UPDATED_AT. Saves that omit base_updated_at are last-write-wins; the web editor saves this way and relies on live collaboration instead. The MCP server always sends it.

Errors

Errors use FastAPI’s detail envelope. detail is either a string or, for errors a client is expected to handle, an object with a stable code and a human-readable message:

{"detail": "Project not found"}
{
  "detail": {
    "code": "MCP_RATE_LIMITED",
    "message": "Too many MCP requests (per-minute limit). Try again in 12 s.",
    "retry_after": 12
  }
}

Status

Meaning

400

The request is well-formed but not acceptable (for example an unknown option).

401

Missing, invalid, expired or revoked credentials. Carries WWW-Authenticate: Bearer.

403

Authenticated but not allowed: project role, workspace role, plan limit, MCP scope or suspended account.

404

The resource does not exist or is not visible to you.

409

Conflict, for example DESIGN_CONFLICT or ACTIVE_SESSION_EXISTS.

422

Request validation failed. For schema errors FastAPI returns detail as a list of field errors.

429

Rate limited.

500

Unhandled server error. The body is {"detail": "Internal server error", "request_id": "..."}; quote the request_id when you contact support.

503

A dependency is not ready (readiness probe, simulation queue).

Every response carries X-Process-Time-Ms (server time in milliseconds).

Rate limits

Limits apply at two layers: the reverse proxy and the backend.

Layer

Scope

Limit (production)

Proxy

All /api/ requests, per client IP

10 requests per second, burst 20

Backend

All API requests, per client IP

Token bucket refilling 20 per second, capacity 100

Backend

Login, registration, password change and reset, Google sign-in, per IP

Token bucket refilling 1 every 5 seconds, capacity 8

Backend

One-time-code requests (password change, forgot password, organization OTP), per IP

Token bucket refilling 1 every 20 seconds, capacity 3

Backend

MCP and OAuth access tokens, per user

60 requests per minute and 2000 per day

A rate-limited request returns 429 with a detail message. MCP limits also return a Retry-After header and retry_after in the body. The health probes are not rate limited.

Pagination

Most list endpoints return a plain JSON array with a fixed server-side cap and no paging parameters (for example GET /api/projects/{id}/versions returns at most 500 entries). The endpoints that page use one of two styles:

  • limit and offset query parameters: GET /api/projects/{id}/vcs/commits (limit 1 to 200, default 50) and GET /api/audit/ (default 50).

  • page and page_size: GET /api/simulations (page from 1, page_size 1 to 100, default 20). The response wraps the page in items with total_count, page, page_size and total_pages.

Health endpoints

GET /health returns service status and version. GET /ready returns 200 when the database, component registry and code generator are ready, and 503 otherwise. GET /live is a liveness probe. These sit at the root, not under /api, and need no token.

Endpoint groups

Each group page lists its endpoints with the minimum project or workspace role and any plan restriction, followed by request and response examples for the main endpoints.