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.
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/last-price-ai:last-price-ai-health-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
openapi: 3.2.0
info:
title: Last Price Ai Health API
version: 1.0.0
contact:
name: API Support
email: support@last-price.ai
license:
name: MIT
x-guidance: 'Last Price computes prices for AI agents. To price one product, service, task or usage-based call, POST /api/compute/price with what is sold and its context (currency, current price or unit cost, product type, optional competitor offer); the answer is a price with its band, the reasons, a trace and a receipt.check_url. To check a price before you pay or quote it, POST /api/price-router/verify. Every operation that carries x-payment-info can be paid on its own with no account: send it with no credential, read the 402, pay, and resend. A workspace key (x-api-key) uses a prepaid balance instead. The MCP server at /api/mcp/rpc offers the same tools.'
x-lastprice-any-of-scopes:
description: On an operation, scopes of which a credential must hold at least one (recording an outcome after a single or a batch compute). Otherwise the same rules as `x-lastprice-scopes`; a refusal is 403 `insufficient_scope` listing every scope that would do.
x-lastprice-any-scope:
description: 'On an operation, `true` when any authenticated credential may call it, a key or token limited to specific scopes included: introspection (`GET /api/me`), usage, and operations that check scopes inside (an agent''s own notifications, settings and inbox). An operation with no `x-lastprice-scopes`, `x-lastprice-any-of-scopes`, `x-required-scopes` or this marker names no scope, so only a key with no scope limits or a dashboard session can call it. The usage operations refuse a credential holding only `workspace:claim`, `team:admin` or `launches:read`. `GET /api/openapi?view=scopes` lists every operation with what it needs.'
x-lastprice-auth:
description: 'How to read an operation that declares `security: []`. In OpenAPI an empty list only says no declared scheme applies; it does not mean the operation is open. Every such operation here carries an `x-lastprice-auth` marker saying which of two cases it is. The dashboard session cookie cannot be declared as a scheme, because it is the project-scoped, chunked `sb-<project-ref>-auth-token` and is browser only, so this marker is the machine-readable record of it. Operations with a declared scheme carry no marker.'
values:
public: Needs no credential. Some of these are rate limited per IP, and the demo operations answer from a pinned demo tenant.
session-cookie: Needs a signed-in dashboard browser session. A JWT or an API key is not accepted and gets 401, so an agent or server-side integration cannot call these at all. Use `GET /api/me` to learn the tenant a credential resolves to instead of `GET /api/user/workspaces`.
x-lastprice-scopes:
description: 'The `AgentScope` values an operation requires, every one of them. A credential that lacks one gets 403 `insufficient_scope` naming the missing scopes in the shared `ErrorEnvelope` (see the `InsufficientScope` response). A credential with no recorded scopes (the dashboard session, or a key or token created without any) holds full access and passes, except an agent principal, which must hold the scopes by name or by a wildcard such as `commerce:*`. An operation without the marker names no scope a key can hold, so a scope-limited credential (a key or token with recorded scopes and no `*`, or any agent credential) gets 403 `insufficient_scope` there with no `required_scopes`, while an unscoped key, a person''s token and the dashboard session pass. The exceptions take any authenticated credential of the workspace and check what they need themselves: `GET /api/me`, the `/api/usage` reads, `POST /api/compute/price`, `POST /api/price-router`, `/api/agents/allowance`, `/api/billing/balance`, `POST /api/billing/topup`, `/api/agents/{id}/capabilities`, the `/api/api-keys` routes, the agent claim (`POST /api/agents/claim`, which needs `workspace:claim` by name) and the operations marked with `x-required-scopes`.'
x-required-roles:
description: On an operation, the workspace roles a person must hold to call it from a dashboard session, or with the person token `POST /api/auth/native-token` issues. Checked before the operation runs; any other role, or none, gets 403 `role_forbidden` with `allowed_roles` and the caller's `role`. API keys and other JWTs name no person and are governed by scopes instead. Credentials (API keys, agent keys, embed tokens) need owner, admin or member; integrations and the tenant record need owner or admin; money (balances, top-ups, refunds, credits, invoices, agent allowances) needs owner, admin or billing.
x-required-scopes:
description: 'On an operation, the scopes an API key must hold BY NAME for the operation to accept it. OpenAPI 3.0 cannot put scopes on an `apiKey` requirement, so this list records them. A wildcard (`*`, or a prefix such as `team:*`) and a key with no scopes recorded never satisfy it. Today only the team administration operations carry it, with `team:admin`. It is stricter than `x-lastprice-scopes`: no wildcard, no unscoped key and no legacy `read`, `write` or `admin` label passes it, so those operations are not marked with `x-lastprice-scopes`.'
description: 'Operations tagged Health across 2 of this provider''s published API definitions: last-price-ai-openapi.json, openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.last-price.ai
description: Production API, the canonical host and the default base URL for generated clients. The interactive docs at /api-docs rewrite this origin to their own, because most operations answer no cross-origin browser call at all. They send no CORS headers, and they refuse a request carrying an Origin that is not their own with a 403. The two embeddable operations are the exception and answer registered origins; see the EmbedToken security scheme. Server-side callers send no Origin and are unaffected.
tags:
- name: Health
x-feature: api
description: Service health check
paths:
/api/openapi:
get:
summary: This OpenAPI document
description: 'Serves this contract. YAML by default. JSON when `format=json` is
passed, or when the `Accept` header ranks `application/json` above
every YAML type (`application/yaml`, `application/x-yaml`,
`text/yaml`, `text/x-yaml`); wildcards and ties keep YAML.
`GET /api/openapi.json` is an alias that always answers JSON. Every
200 carries `Vary: Accept`.'
tags:
- Health
security: []
x-lastprice-auth: public
parameters:
- name: format
in: query
required: false
description: Force the representation. Overrides the `Accept` header.
schema:
type: string
enum:
- json
- yaml
- yml
responses:
'200':
description: The OpenAPI document.
headers:
Vary:
schema:
type: string
description: Always `Accept`.
content:
application/yaml:
schema:
type: string
application/json:
schema:
type: object
'404':
description: The spec file is not present in this deployment.
'500':
description: The spec file could not be read or parsed.
operationId: getApiOpenapi
x-operation-id-source: derived
servers:
- url: https://api.last-price.ai
description: Production API, the canonical host and the default base URL for generated clients. The interactive docs at /api-docs rewrite this origin to their own, because most operations answer no cross-origin browser call at all. They send no CORS headers, and they refuse a request carrying an Origin that is not their own with a 403. The two embeddable operations are the exception and answer registered origins; see the EmbedToken security scheme. Server-side callers send no Origin and are unaffected.
/api/health:
get:
summary: Health check
description: Check if the API service is running
tags:
- Health
security: []
x-lastprice-auth: public
responses:
'200':
description: Service is healthy
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: ok
timestamp:
type: string
format: date-time
example: '2024-01-15T10:30:00.000Z'
operationId: getApiHealth
x-operation-id-source: derived
servers:
- url: https://api.last-price.ai
description: Production API, the canonical host and the default base URL for generated clients. The interactive docs at /api-docs rewrite this origin to their own, because most operations answer no cross-origin browser call at all. They send no CORS headers, and they refuse a request carrying an Origin that is not their own with a 403. The two embeddable operations are the exception and answer registered origins; see the EmbedToken security scheme. Server-side callers send no Origin and are unaffected.
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: "Bearer token for Last Price API authentication. An API key\n(`lp_...`) sent here is read exactly as if it were sent in\n`x-api-key`; when both are sent, `x-api-key` is used. JWTs MAY carry a\n`scopes` claim drawn from the `AgentScope` catalogue (see schemas).\nWhen a route declares required scopes, the caller's `scopes` claim\nmust satisfy every required entry directly or via a wildcard parent\n(e.g. `commerce:*` grants `commerce:proposal:approve`). Tokens whose\n`scopes` claim is absent or empty are treated as the legacy admin\ngrant for backward compatibility, EXCEPT when the token represents\nan agent (PR 3): if any of `agent_id` or `actor_kind = \"agent\"` is\nset, the legacy admin grant is disabled and required scopes must be\nsatisfied explicitly.\n\nAdditional PR 3 claims (all optional, additive):\n - `agent_id` - non-human principal id (see `Agent`)\n - `parent_agent_id` - delegation chain root\n - `task_id` - logical task id; the `X-Agent-Task-Id`\n request header overrides this when present\n - `actor_kind` - explicit principal kind override\n (`tenant | agent | api_key | service`)\n"
SupabaseBearerAuth:
type: http
scheme: bearer
description: 'A Supabase access token (the user''s Supabase session JWT), NOT a Last
Price JWT. Used only by `POST /api/auth/native-token`, which exchanges
it for a Last Price JWT; that minted token is then sent as `BearerAuth`
on every other protected route. Kept as a separate scheme so generated
clients advertise the correct credential type for the exchange.
'
ApiKey:
type: apiKey
in: header
name: x-api-key
description: 'Platform API key (`x-api-key` header). Create keys via `POST /api/api-keys`
(requires JWT). Format: `lp_<40 hex chars>`. Keys are validated against
the `api_keys` DB table; the hash is looked up per request to derive
the tenant. Keys MAY carry a `scopes` array drawn from the `AgentScope`
catalogue; the empty array is treated as the legacy admin grant.
This is a SECRET credential and must stay server side. It is also
unreachable from a cross-origin browser: the CORS preflight on the
embeddable routes does not allow the `x-api-key` header, so a page
that tried to send one would never get the request through.
'
EmbedToken:
type: apiKey
in: header
name: x-embed-token
description: "Publishable embed token (`x-embed-token` header). Format:\n`lpe_<32 hex chars>`. Create tokens via `POST /api/embed-tokens`\n(requires a dashboard session or JWT).\n\nUnlike `ApiKey`, this credential is meant to be public: it ships in the\npage source of a customer's own site. It is scoped accordingly and it\nis NOT interchangeable with an API key.\n\n - Accepted on three operations only: the pricing lookup\n (`GET /api/experiments/{experimentId}/pricing`), the conversion\n beacon (`POST /api/experiments/{experimentId}/convert`) and the\n storefront outcome report\n (`POST /api/experiments/{experimentId}/outcome`, off by default),\n which also needs the single-use outcome token the pricing lookup\n signed. Every other PROTECTED operation ignores the header. Called\n from a web page (with an `Origin` that is not the API's own) it answers\n 403, \"This endpoint does not answer cross-origin browser calls\"; called\n without an `Origin`, as a server would, it answers 401 because no\n credential it accepts was sent. Operations that are public by\n design (health, the public demo and discovery endpoints) need no\n credential at all and answer normally whether the header is\n present or not.\n - Can be bound to some of the workspace's experiments\n (`experiment_keys` when it is created). A bound token prices and\n converts only on those; an unknown key and a key outside the list\n get the same 403, code `experiment_not_available`, so a visitor\n cannot tell which experiments exist.\n - Usable only from the origins recorded on the token. A request whose\n `Origin` is missing, or is not listed on THAT token, is answered\n with 403. `CORS_ALLOWED_ORIGINS` does not widen this: it says which\n origins the API answers, never which credential may speak for a\n tenant.\n\n What that check is and is not worth: a browser sets `Origin` itself\n and a page cannot forge it, so this reliably stops the common case,\n a token lifted from one site and dropped into another. It is NOT a\n proof of provenance. Any HTTP client can send whatever `Origin` it\n likes, so a caller who has copied the token can still replay it from\n a server. That is accepted, and it is why the credential is narrow\n by construction rather than trusted: three narrowly scoped operations,\n one tenant, a scope that satisfies no scope requirement, a per-token\n per-address rate limit, and revocation that takes effect on the next\n request. Anything that must not be replayable takes the API key,\n server side.\n - Carries the scope `embed`, which satisfies no scope requirement, so\n it can never stand in for the legacy admin grant.\n - Rate limited per token per client address, because one public\n token is shared by every visitor, and again as an aggregate for\n the workspace's embed traffic. That aggregate is separate from\n the workspace's general API budget, so storefront page views and\n API calls cannot throttle one another.\n - Revoke it in the dashboard or via\n `DELETE /api/embed-tokens/{tokenId}`; revocation takes effect on\n the next request.\n"
webhookSignature:
type: apiKey
in: header
name: x-paid-signature
description: HMAC signature for webhook verification
SvixWebhookSignature:
type: apiKey
in: header
name: svix-signature
description: 'Svix delivery signature, used by `POST /api/webhooks/agentmail`
and `POST /api/webhooks/resend`.
Both senders deliver through Svix, so every request carries the
`svix-id`, `svix-timestamp`, and `svix-signature` triple and all
three are verified together against the endpoint''s Svix signing
secret (a `whsec_`-prefixed key), using the standard Svix scheme:
the signed payload is `{svix-id}.{svix-timestamp}.{body}`, and a
delivery whose timestamp falls outside a five-minute window either
side is rejected as a replay. An apiKey scheme can only name one
header, so `svix-signature` stands for the set; the other two are
documented as parameters on the operation and are equally required.
This is a different scheme from `webhookSignature`, the plain
`x-paid-signature` HMAC used by `POST /api/webhooks/paid`.
'
ShopifyWebhookSignature:
type: apiKey
in: header
name: x-shopify-hmac-sha256
description: 'Shopify webhook signature, used by
`POST /api/webhooks/shopify/{accountId}`: the base64 HMAC-SHA256 of
the raw body, keyed with the connector account''s
`credentials.webhook_secret` when set (webhooks created in the store
admin), otherwise its `client_secret` (webhooks the store''s app
subscribes to). `x-shopify-shop-domain` must match the account''s
`shop_domain`.
'
CardCheckoutSignature:
type: apiKey
in: header
name: Stripe-Signature
description: 'Card checkout delivery signature, used by
`POST /api/webhooks/card-topup`: `t=<unix seconds>,v1=<signature>`,
where each `v1` is the hex HMAC-SHA256 of `{t}.{body}` keyed with the
endpoint''s signing secret. Several `v1` entries may appear while a
rotated secret overlaps; one matching is enough. A delivery whose
`t` is more than five minutes from now is rejected as a replay.
'
StandardWebhookSignature:
type: apiKey
in: header
name: webhook-signature
description: 'Standard Webhooks delivery signature, used by
`POST /api/webhooks/loops`. Every request carries the `webhook-id`,
`webhook-timestamp`, and `webhook-signature` triple and all three are
verified together against the endpoint''s signing secret (a
`whsec_`-prefixed key): the signed payload is
`{webhook-id}.{webhook-timestamp}.{body}` under HMAC-SHA256, the
header may list several space-separated `v1,<signature>` entries
while a rotated secret overlaps, and a delivery whose timestamp falls
outside a five-minute window either side is rejected as a replay. It
is the Svix scheme under different header names. An apiKey scheme can
only name one header, so `webhook-signature` stands for the set; the
other two are documented as parameters on the operation and are
equally required.
'
ClientCredentials:
type: oauth2
description: 'OAuth 2.0 client_credentials flow (RFC 6749 §4.4). The token URL
accepts an agent-bound API key as `client_id` (key prefix) +
`client_secret` (full key) and returns a 1-hour agent JWT. The
returned JWT is then sent as `Authorization: Bearer <jwt>` on
protected routes (matching the `BearerAuth` security scheme).
'
flows:
clientCredentials:
tokenUrl: /api/oauth/token
scopes:
price:compute: Run a price computation
price:compute:batch: Run a batched price computation
billing:read: Read invoices, payments, credits, and marketplace earnings and payouts
billing:write: Create or change invoices, payments, refunds and credits
commerce:catalog:read: Read commerce connectors, catalog, observations, policies, proposals and hosted scraping jobs
commerce:checkout: Start, change, cancel or complete a UCP checkout session
commerce:configure: Set up commerce connectors, pricing policies, data and hosted scraping jobs
commerce:proposal:draft: Create a draft price-change proposal
commerce:proposal:approve: Approve a price-change proposal
commerce:proposal:reject: Reject a price-change proposal
commerce:execute: Execute an approved proposal
experiments:read: Read price experiments, their results and sequential test, and their embed tokens
experiments:write: Create experiments, change their sequential test, record conversions, and mint or revoke embed tokens
integrations:read: Read the workspace integrations, the Salesforce sync log and the Datadog key pairs (never a key)
integrations:write: Run a Salesforce sync, disconnect it, and check, add or delete Datadog key pairs and send telemetry
launches:read: Last Price staff only. Read the launch plans of features built behind a release flag (API key only; granted by name by a signed-in staff member; not carried by wildcards; works only while the key's creator is still staff)
notifications:read: Read the workspace notifications feed and the credential's own email alert settings
notifications:write: Mark notifications read for the credential itself and change its own email alert settings
partner:workspaces: Open and list managed workspaces for other people's businesses (partner workspaces only)
pcn:function:read: Read PCN function definitions
pcn:function:publish: Publish a PCN function
pcn:function:test: Test a PCN function
pcn:routing:read: Read PCN routing rules
pcn:routing:write: Modify PCN routing rules
audit:read: Read the audit log
rosetta:read: Read Rosetta's review queue and learned adapters
rosetta:write: Ingest, plan, translate, normalize and freeze data with Rosetta, settle reviews, and delete an adapter
webhooks:read: List webhook endpoints (signing keys masked) and their deliveries
webhooks:write: Add, change, ping or delete webhook endpoints, and replace a signing key
team:admin: Administer this workspace's members, roles and invitations for the person who created the key (API key only; granted by name by an owner or admin; not carried by wildcards; agent tokens are refused on these operations)
workspace:admin: Create workspaces owned by the person who created the key (API key only; granted by name by an owner or admin; not carried by wildcards; never reaches credentials)
workspace:claim: Claim a self-registered agent workspace into this workspace for the person who owns it (granted by name by an owner or admin; not carried by wildcards)
workspace:settings:read: Read this workspace's settings (company details, tax registrations, invoice defaults, sales playbook) and which inference providers it has connected, never their keys. The agent that owns an unclaimed workspace needs no scope.
workspace:settings:write: 'Change this workspace''s settings: company details, tax registrations, invoice defaults and the sales playbook. Model credentials are not settable here. The agent that owns an unclaimed workspace needs no scope.'
TenantId:
type: apiKey
in: header
name: x-tenant-id
description: Legacy tenant UUID header (development/migration only; not accepted on authenticated endpoints)
x-refined-from:
- last-price-ai-openapi.json
- openapi.json