Lochless Context API
The Context API from Lochless — 1 operation(s) for context.
The Context API from Lochless — 1 operation(s) for context.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/lochless-io:lochless-io-context-api"
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.
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: 3.2.0
info:
title: Synoptic Customer Context 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: Context
paths:
/context:
post:
summary: Retrieve source evidence directly without Ask
description: 'Scope: ask. Search uses the shared pipeline rate limit; other operations use the read tier. The key chooses the workspace and sees workspace connections only. No query_id is required. Omitted operation means search. Returns source text, provenance, versions, cost and coverage. Follow next_cursor with next_page_offset, and next_content_offset with source_version for full-source reads. Partial coverage is not evidence of absence. For calendar event browsing, set participant to an email or any.
Lochless workspaces: limit is results per page, default 50, up to 100. The response is results, total_results (every result the query has, across all pages), next_cursor (pass it back as cursor), tokens_scanned and request_id. Only the first page is charged; later pages of the same query are free. Filters (search and browse): from / to (ISO 8601, on the document''s own timestamp; from inclusive, to exclusive; a YYYY-MM-DD date alone is that whole UTC day) and metadata ({key: value} exact match; a list value = any of). Only matching documents are read, scanned and billed. dry_run: true (search) returns documents_matched, documents_ready, tokens_to_scan and price_usd without scanning; free, rate-limited like a query. A dry run also returns read_limit_usd and complete (whether that limit reads every matching document).
Read limit (search): read_limit_usd caps what one call may cost, default 1. Over it, the best-matching documents are read first, and only what was read is billed. coverage is {mode, documents_read, documents_total, complete}. When complete is false the response has continue_cursor: send the same request with it to read the next best-matching documents, up to read_limit_usd again; no document is read twice. next_cursor pages stay free. 409 conflict: the documents changed since the first read; run the query again.
Read mode (search): mode is fast or complete. fast reads only the best-matching results (a lookup: one fact or answer), quicker and cheaper, and bills only what it read; it may miss matches. complete reads every matching document, up to read_limit_usd. Without mode the question decides. coverage.mode says which ran; a fast read has no continue_cursor (send mode: complete to read every match).'
requestBody:
required: true
content:
application/json:
schema:
$schema: https://json-schema.org/draft/2020-12/schema
anyOf:
- oneOf:
- type: object
properties:
operation:
type: string
const: search
query:
type: string
minLength: 1
maxLength: 4000
sources:
description: Optional sources for this subquery, within the user's task boundaries.
anyOf:
- maxItems: 20
type: array
items:
type: string
minLength: 1
maxLength: 128
- type: 'null'
limit:
default: 5
type: integer
minimum: 1
maximum: 20
cursor:
type: string
maxLength: 2000
page_offset:
type: integer
minimum: 0
maximum: 9007199254740991
time_field:
default: activity_at
type: string
enum:
- activity_at
- event_start
- source_updated_at
- indexed_at
since:
type: string
format: date-time
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
until:
type: string
format: date-time
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
order:
default: desc
type: string
enum:
- asc
- desc
database_id:
type: string
minLength: 1
maxLength: 128
required:
- operation
- query
- limit
- time_field
- order
additionalProperties: false
- type: object
properties:
operation:
type: string
const: browse
sources:
description: Optional sources for this subquery, within the user's task boundaries.
anyOf:
- maxItems: 20
type: array
items:
type: string
minLength: 1
maxLength: 128
- type: 'null'
limit:
default: 5
type: integer
minimum: 1
maximum: 20
cursor:
type: string
maxLength: 2000
page_offset:
type: integer
minimum: 0
maximum: 9007199254740991
time_field:
default: activity_at
type: string
enum:
- activity_at
- event_start
- source_updated_at
- indexed_at
since:
type: string
format: date-time
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
until:
type: string
format: date-time
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
order:
default: desc
type: string
enum:
- asc
- desc
participant:
description: 'For timed calendar events: me (default), any, or an attendee email.'
type: string
minLength: 1
maxLength: 320
scan_after:
type: object
properties:
at:
type: string
format: date-time
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
id:
type: string
minLength: 1
maxLength: 2048
required:
- at
- id
additionalProperties: false
required:
- operation
- limit
- time_field
- order
additionalProperties: false
- type: object
properties:
operation:
type: string
const: read
document_id:
type: string
minLength: 1
maxLength: 2048
connection_id:
type: string
minLength: 1
maxLength: 128
source_version:
type: string
maxLength: 128
content_offset:
default: 0
type: integer
minimum: 0
maximum: 9007199254740991
required:
- operation
- document_id
- connection_id
- content_offset
additionalProperties: false
- type: object
properties:
operation:
type: string
const: database
database_id:
type: string
minLength: 1
maxLength: 128
sources:
description: Optional sources for this subquery, within the user's task boundaries.
anyOf:
- maxItems: 20
type: array
items:
type: string
minLength: 1
maxLength: 128
- type: 'null'
limit:
default: 5
type: integer
minimum: 1
maximum: 20
cursor:
type: string
maxLength: 2000
page_offset:
type: integer
minimum: 0
maximum: 9007199254740991
record_id:
type: string
revision:
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
source_version:
type: string
content_offset:
type: integer
minimum: 0
maximum: 9007199254740991
required:
- operation
- database_id
- limit
additionalProperties: false
- type: object
properties:
query:
type: string
minLength: 1
maxLength: 4000
sources:
description: Optional sources for this subquery, within the user's task boundaries.
anyOf:
- maxItems: 20
type: array
items:
type: string
minLength: 1
maxLength: 128
- type: 'null'
limit:
default: 5
type: integer
minimum: 1
maximum: 20
cursor:
type: string
maxLength: 2000
page_offset:
type: integer
minimum: 0
maximum: 9007199254740991
time_field:
default: activity_at
type: string
enum:
- activity_at
- event_start
- source_updated_at
- indexed_at
since:
type: string
format: date-time
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
until:
type: string
format: date-time
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
order:
default: desc
type: string
enum:
- asc
- desc
database_id:
type: string
minLength: 1
maxLength: 128
required:
- query
- limit
- time_field
- order
additionalProperties: false
example:
query: Which support problems block deployment?
sources:
- gong
- pylon
responses:
'200':
description: Source records, continuation fields, cost_usd, coverage and tokens_scanned (your text this call read, each piece once; 0 for browse and read). No composed answer.
'400':
description: Invalid context request or forbidden identity fields
'401':
description: Missing, invalid, revoked or expired API key
'402':
description: spend_cap_reached (monthly spend cap reached) or add_credit (balance used up; top up in the console)
'403':
description: Missing ask scope or unavailable source scope
'409':
description: 'conflict: source, access or continuation changed; restart the read'
'422':
description: Unsupported filter, including calendar me for a workspace key
'429':
description: Rate limit exceeded
'502':
description: Context temporarily unavailable
tags:
- Context
operationId: postContext
x-operation-id-source: derived
components:
securitySchemes:
ApiKey:
type: http
scheme: bearer
bearerFormat: sk_synoptic_*