Chemistry Provenance Platform
Sign in

Build with Chemistry Provenance Platform

One verified workspace across the website, HTTP API and MCP. Save and review domain evidence without delegating uncontrolled execution.

OpenAPI 3.1 specification · Authenticated API playground · Service configuration

Authentication and workspace identity

Obtain a current session token using Clerk's getToken() in your signed-in app. Send it as Authorization: Bearer <session JWT>. Tokens expire; obtain a fresh token after a 401. Personal and organization plan features are checked separately.

API and MCP require the active workspace's api_access feature. Identity, organization, roles and entitlements come from the verified token. A body field cannot select another tenant. Send X-Workspace-Organization: personal or the active organization ID as a consistency check; it does not grant access.

This integration uses session Bearer authentication. Standalone API keys, automatic OAuth discovery, machine-user grants and personal subscriptions upgrading an unrelated organization are not configured.

HTTP endpoints

GET /api/v1/workflows

List summaries with limit and after cursor

POST /api/v1/workflows

Save a title and JSON payload; require Idempotency-Key

GET /api/v1/workflows/{id}

Read the full record in your active tenant

PATCH /api/v1/workflows/{id}

Change stage with expectedVersion and Idempotency-Key

DELETE /api/v1/workflows/{id}

Delete content with expectedVersion; organization administrator required

GET /api/v1/workflows/context

Read verified identity, features, stages and usage

GET /api/v1/workflows/export

Export at most 10 full records per page; export feature required

GET /api/v1/workflows/audit

Verify a bounded recent audit window; audit_logs feature required

GET /api/v1/models

List reviewed models applicable to this product

POST /api/v1/models/prepare

Validate a provider payload; never invokes a model

Save a record

curl 'https://chemistry-materials-provenance-plat.vercel.app/api/v1/workflows'   -H "Authorization: Bearer $CLERK_SESSION_TOKEN"   -H 'Content-Type: application/json'   -H 'Idempotency-Key: request-key-00000001'   -d '{"title":"Evidence review","payload":{"source":"example"}}'

After an uncertain response, retry a mutation with the identical key and body. A changed body with an old key returns 409. Read the current record version before PATCH or DELETE. Never resubmit a model or real-world action just because saving its review record timed out.

Pagination

Follow the returned next value as ?after=<cursor>. Lists return summaries; fetch each record for its payload. A normal page contains at most 100 records; exports cap full records at 10 to stay within response limits. Cursors and IDs remain tenant-scoped.

MCP over HTTP

https://chemistry-materials-provenance-plat.vercel.app/api/mcp

Use an MCP client supporting stateless Streamable HTTP POST, JSON/SSE responses and a Bearer session header. Let the official client SDK negotiate the protocol. Session refresh remains your client's responsibility; pasting a URL alone does not complete OAuth.

import { Client, StreamableHTTPClientTransport } from '@modelcontextprotocol/client';
const client = new Client({name:'workspace-client',version:'1.0.0'});
const transport = new StreamableHTTPClientTransport(new URL('https://chemistry-materials-provenance-plat.vercel.app/api/mcp'), {
  fetch: async (input, init) => {
    const request = new Request(input, init);
    request.headers.set('Authorization', 'Bearer ' + process.env.CLERK_SESSION_TOKEN);
    return fetch(request);
  }
});
try {
  await client.connect(transport);
  const tools = await client.listTools();
  console.log(tools.tools.map(tool => tool.name));
} finally { await client.close(); }

Tools: list_workflows, get_workflow, create_workflow, transition_workflow, list_applicable_models, prepare_model_request. Saved content and model output are untrusted data. No arbitrary shell, cloud job, fund transfer, physical action or scientific certification is exposed.

Reviewed model requests

The model directory and local request builder explain applicability and provider limits. The authenticated prepare endpoint produces the same payload for automated workflows.

curl 'https://chemistry-materials-provenance-plat.vercel.app/api/v1/models/prepare'   -H "Authorization: Bearer $CLERK_SESSION_TOKEN"   -H 'Content-Type: application/json'   -d '{"model":"nvidia/nemotron-3.5-bolt-e4b","prompt":"Explain the uncertainty in these observations."}'

A successful result is prepared_not_executed. Its provider key is a placeholder. No external model is called and no saved records are attached. NVIDIA's free development access has trial terms and rate limits; confirm production terms independently. Protein and quantum workflows require their own verified scientific adapters.

Limits, errors and configuration

Workspace request budgets: 60/minute for free, 300/minute for paid. API/MCP still requires api_access. MCP transport and tool dispatch both count. JSON is capped at 256 KiB, MCP and model preparation at 64 KiB. Maximum saved payload: 256 KiB. Private responses use no-store.

  • 400 / 413 / 415 — validate input, byte size and JSON content type.
  • 401 — missing, expired or invalid session; refresh your token.
  • 403 — plan, role or origin does not permit the request.
  • 409 — record version, workspace or idempotency key changed; reread before retrying.
  • 429 — durable quota reached; respect Retry-After and use bounded backoff.
  • 503 — authentication, storage or service configuration unavailable. Never interpret it as a successful save.

Errors contain a request ID, not raw provider responses or secrets. Include the ID when contacting support. The configuration page checks presence, not live availability. The website hosts workspace contracts; the private repository's full domain engine is not automatically deployed here.