Lochless Widgets API

The Widgets API from Lochless — 1 operation(s) for widgets.

GitHub OpenAPI

Operations 1

POST /widgets/preview Compile + run one widget, persist nothing (scope: dashboards:write) #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lochless-io:lochless-io-widgets-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lochless-io-widgets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Synoptic Customer Widgets API
  version: 1.0.0
  description: 'Token-authenticated programmatic surface for Synoptic: dashboards (CRUD + widgets + preview + render), ask and direct context retrieval. Authenticate with an org-scoped API key (Settings → API Keys) as a bearer token. A key carries scopes — the access grant — and is org-scoped: every request derives its org ONLY from the key, and sees every record of the workspace''s workspace connections, and none of anyone''s personal connections.


    Rate limits (per organization, per minute): 120 reads, 120 writes, 1,000 ingest calls, 10 pipeline-backed calls (ask / preview / render). Over the limit returns 429 with Retry-After. These are FLOORS, not exact ceilings: counters are held per web task and requests are not pinned to a task, so a caller is always allowed at least the stated number per minute and may in practice be allowed a small multiple of it. Do not build a client that depends on the extra headroom — it varies with how the service is scaled. Honour Retry-After instead.


    Per-key query limits (exact, shared across the service): each key may make 600 context searches plus asks per minute and run 20 at once. Over the rate returns 429 rate_limited; a 21st call while 20 run returns 429 concurrency_limited. Both carry Retry-After. A workspace can ask for higher limits.'
servers:
- url: /api/v1
security:
- ApiKey: []
tags:
- name: Widgets
paths:
  /widgets/preview:
    post:
      summary: 'Compile + run one widget, persist nothing (scope: dashboards:write)'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Widget'
      responses:
        '200':
          description: '{ widget, result, chosen, options, interpretation, ... }'
        '400': {}
      tags:
      - Widgets
      operationId: postWidgetsPreview
      x-operation-id-source: derived
components:
  schemas:
    Widget:
      type: object
      required:
      - type
      - prompt
      properties:
        type:
          type: string
          enum:
          - number
          - over_time
          - breakdown
          - share
          - over_time_by_group
          - table
          - narrative
          - status_kpi
          - before_after
          - timeline
          - quote
          - checklist
          - param_block
        prompt:
          type: string
          description: The widget's NL subject. Untrusted free text — stored, never interpreted.
        title:
          type: string
          maxLength: 80
          description: Optional short heading for the card. Omit and the heading is derived from the subject. Display-only — never compiled or executed, so it cannot change what the widget computes.
        spec:
          type: object
          description: Deliverable widgets only (status_kpi/timeline/checklist/...). Display-only labels, never executed.
        params:
          type: object
          properties:
            metric:
              type: string
            dimension:
              type: string
            time_bucket:
              type: string
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: sk_synoptic_*