PayWithLocus Okibi Identity API
Feature-gated Okibi identity verification and scoped native CLI credential bootstrap
Feature-gated Okibi identity verification and scoped native CLI credential bootstrap
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/paywithlocus-com:paywithlocus-com-okibi-identity-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: Locus Pro Okibi Identity API
description: Production is live at https://api.paywithlocus.com/api. Stage remains available for evaluation and integration testing at https://api.stage.paywithlocus.com/api; credentials, balances, and tenant data are isolated by environment. Embedded prepaid credits over the Locus pay-per-use catalog. Money and top-up amounts use exact decimal strings (up to 6dp). Every burn requires an Idempotency-Key header. Management routes accept a tenant secret key or authorized dashboard session as shown per operation. High-risk operations protected by workspace-administrator step-up require an owner or admin dashboard session, the applicable scope, and MFA/passkey authentication completed in the last ten minutes; developer, billing, viewer, and secret-key principals remain ineligible even when a matching scope is present. Scoped secret keys retain only the explicitly documented Agent Connection lifecycle exception. Widget routes accept an end-user JWT alone; when a publishable key is present it must belong to the JWT's tenant. MCP uses OAuth 2.1 Authorization Code with PKCE by default and also accepts the explicitly documented tenant secret key, end-user JWT, or scoped agent connection compatibility credentials. Burns accept the execution credentials shown per operation. Publishable keys never authorize management or burns by themselves.
version: 0.7.0
servers:
- url: https://api.paywithlocus.com/api
description: Production
- url: https://api.stage.paywithlocus.com/api
description: Stage — evaluation and integration testing
security:
- secretKey: []
tags:
- name: Okibi Identity
description: Feature-gated Okibi identity verification and scoped native CLI credential bootstrap
paths:
/credits/okibi/cli-credential:
get:
tags:
- Okibi Identity
summary: Read Okibi CLI credential bootstrap status
operationId: getCreditsOkibiCliCredential
description: A real Okibi-protected resource used to verify the signed CLI release, active identity grant, durable Locus account binding, and current installation credential state. It never returns the raw native credential. The account block names the linked Locus user and whether that user still has to choose a password. Requires both mcp:read and mcp:execute from Okibi Identity.
security:
- okibiIdentity: []
responses:
'200':
description: Verified installation and current native credential state
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- success
- identityProvider
- installationId
- account
- credentialConfigured
- connection
- bootstrap
properties:
success:
const: true
identityProvider:
const: okibi
installationId:
type: string
account:
$ref: '#/components/schemas/OkibiLinkedAccount'
credentialConfigured:
type: boolean
connection:
oneOf:
- $ref: '#/components/schemas/OkibiCliConnectionMetadata'
- type: 'null'
bootstrap:
type: object
additionalProperties: false
required:
- method
- registrationToken
- tools
properties:
method:
const: POST
registrationToken:
type: string
tools:
type: string
'401':
description: Missing, invalid, expired, or inactive Okibi capability
'403':
description: Missing mcp:read/mcp:execute or inactive Locus membership
post:
tags:
- Okibi Identity
summary: Bootstrap a scoped Locus CLI credential from Okibi Identity
operationId: postCreditsOkibiCliCredential
description: Exchanges a verified Okibi identity grant for one Locus lcac_ execution credential bound to the Okibi identity, CLI installation, and selected workspace. The credential expires 7 days after its last use and never later than 30 days after issue; every bootstrap issues it fresh for 7 days. Generate registrationToken locally from exactly 24 random bytes encoded as unpadded base64url. Replaying the token renews the installation's credential unchanged; a new token rotates that credential in place (same connection, new secret and prefix). A revoked credential is never renewed or rotated. When tools is present the server enables exactly those catalog slugs and restricts the credential to them; when it is omitted the credential may use every endpoint the workspace has enabled, and a fresh bootstrap may replace or lift an existing allowlist. The token is never stored; Locus stores only the derived credential hash.
security:
- okibiIdentity: []
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- registrationToken
properties:
registrationToken:
$ref: '#/components/schemas/AgentRegistrationToken'
tools:
type: object
additionalProperties: false
required:
- enable
description: Optional endpoint allowlist. Omit it to leave the credential unrestricted within the workspace's enabled endpoints.
properties:
enable:
type: array
minItems: 1
maxItems: 200
uniqueItems: true
items:
type: string
pattern: ^[^/\s]+/[^/\s]+$
description: Exact provider/endpoint catalog slug, for example apollo/people-search.
responses:
'200':
description: Existing credential renewed (same token) or rotated in place (new token); rotated tells which
content:
application/json:
schema:
$ref: '#/components/schemas/OkibiCliCredentialEnvelope'
'201':
description: New native credential created for this installation
content:
application/json:
schema:
$ref: '#/components/schemas/OkibiCliCredentialEnvelope'
'400':
description: Invalid registration token, empty endpoint allowlist, or unknown field
'401':
description: Missing, invalid, expired, or inactive Okibi capability
'403':
description: Missing mcp:read/mcp:execute or inactive Locus membership
'404':
description: Unknown provider/endpoint catalog slug
'409':
description: The installation's native credential was revoked in the dashboard, or the registration token already belongs to another installation
components:
schemas:
OkibiLinkedAccount:
type: object
additionalProperties: false
required:
- email
- passwordSetupPending
description: The Locus user behind the Okibi identity link. Locus provisions an account for an Okibi-verified email that has none; that account keeps a managed password until the person sets one through the emailed link or the dashboard's first screen.
properties:
email:
type: string
format: email
passwordSetupPending:
type: boolean
description: True while the provisioned account still has to choose a password. Tell the user to check their email for the Locus set-password link.
OkibiCliConnectionMetadata:
type: object
additionalProperties: false
required:
- id
- status
- keyPrefix
- tools
- expiresAt
- lastUsedAt
properties:
id:
type: string
format: uuid
status:
type: string
enum:
- active
- expired
- revoked
keyPrefix:
type: string
description: Non-secret display prefix.
tools:
$ref: '#/components/schemas/OkibiCliConnectionTools'
expiresAt:
type: string
format: date-time
description: Moves forward on each authenticated use, to 7 days after that use and never past 30 days after issue.
lastUsedAt:
oneOf:
- type: string
format: date-time
- type: 'null'
OkibiCliConnectionTools:
type: object
additionalProperties: false
required:
- enable
properties:
enable:
oneOf:
- type: array
items:
type: string
- type: 'null'
description: Provider/endpoint slugs this credential may call. null means every endpoint the workspace has enabled.
OkibiCliCredentialEnvelope:
type: object
additionalProperties: false
required:
- success
- created
- rotated
- account
- connection
- storage
properties:
success:
const: true
created:
type: boolean
description: True when this bootstrap created the installation's credential (HTTP 201).
rotated:
type: boolean
description: True when a new registration token replaced the existing credential's secret in place (HTTP 200).
account:
$ref: '#/components/schemas/OkibiLinkedAccount'
connection:
type: object
additionalProperties: false
required:
- id
- status
- keyPrefix
- tools
- expiresAt
- lastUsedAt
- credential
properties:
id:
type: string
format: uuid
status:
type: string
enum:
- active
- expired
- revoked
keyPrefix:
type: string
description: Non-secret display prefix.
tools:
$ref: '#/components/schemas/OkibiCliConnectionTools'
expiresAt:
type: string
format: date-time
description: Moves forward on each authenticated use, to 7 days after that use and never past 30 days after issue.
lastUsedAt:
oneOf:
- type: string
format: date-time
- type: 'null'
credential:
type: string
pattern: ^lcac_
readOnly: true
description: Raw scoped Locus credential. Capture once and never log it.
storage:
type: object
additionalProperties: false
required:
- environmentVariable
- instruction
properties:
environmentVariable:
const: LOCUS_SECRET_KEY
instruction:
type: string
AgentRegistrationToken:
type: string
pattern: ^[A-Za-z0-9_-]{32}$
description: Canonical base64url encoding of 24 bytes generated by a cryptographically secure random-number generator.
securitySchemes:
secretKey:
type: http
scheme: bearer
description: Tenant secret key (lcr_…). Server-side only.
sandboxKey:
type: http
scheme: bearer
description: 'Sandbox key (lcrsb_…). Metered calls are simulated: no credits move, no providers are called. No management access. Simulation is served from fixtures for the hosted provider catalog; external-rail providers are not registered with the sandbox interceptor and answer 404.'
endUserToken:
type: http
scheme: bearer
description: 60-3600 second end-user JWT minted via /credits/end-users/{id}/token. If the JWT has sid, send the original session value in X-Locus-Session-Id; sid contains only its SHA-256 fingerprint. Bearer tokens are replayable until expiry; use short TTLs, optional session binding, and Idempotency-Key on operations.
publishableKey:
type: apiKey
in: header
name: X-Locus-Publishable-Key
description: 'Widget calls: rides alongside the end-user token.'
dashboardSession:
type: http
scheme: bearer
description: Locus Pro dashboard session (Cognito). High-risk workspace administration requires an owner or admin role and fresh MFA/passkey step-up.
mcpOAuth:
type: oauth2
description: Primary authentication for the hosted MCP resource. Public clients use Authorization Code with PKCE S256. mcp:read covers discovery and resource reads; billed tools/call additionally requires mcp:execute; offline_access requests a rotating refresh token.
flows:
authorizationCode:
authorizationUrl: https://api.paywithlocus.com/api/credits/mcp/oauth/authorize
tokenUrl: https://api.paywithlocus.com/api/credits/mcp/oauth/token
refreshUrl: https://api.paywithlocus.com/api/credits/mcp/oauth/token
scopes:
mcp:read: Discover and read the authenticated MCP catalog and resources.
mcp:execute: Execute billed MCP tools.
offline_access: Issue and rotate a persistent refresh token.
mcpRegistrationToken:
type: http
scheme: bearer
description: Dynamic-client registration access token returned once when the MCP OAuth client is created. It remains valid only for that client's registration management URI.
agentConnection:
type: http
scheme: bearer
description: Scoped lcac_ credential. Tenant-managed Agent Connections authorize only their bound MCP and wrapped execution surfaces. A bootstrap connection for a self-registered agent additionally authorizes the explicit /credits/agent/* self-service routes for its own account; neither form authorizes general tenant management.
okibiIdentity:
type: http
scheme: bearer
bearerFormat: Okibi capability
description: Short-lived capability injected only by an Identity-eligible signed Okibi CLI release. It is verified by @okibi/partner-kit for issuer, audience, installation, grant activity, and required route scopes. Never persist or copy it into native Locus configuration.