Lathe Account API
The account API from Lathe — 2 operation(s) for account.
The account API from Lathe — 2 operation(s) for account.
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/lathe-live:lathe-live-account-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: Lathe customer Account API
description: 'Manage your Lathe instances from code or from an AI agent.
**Authentication.** Create an API key on the Access page of the portal and send it as
`Authorization: Bearer lathe_…`. Keys act as the customer who created them; they cannot create or
revoke other keys.
**Creating an instance.** Where `GET /plans` offers Free, `POST /instances` with `tier: "free"` creates a $0 instance immediately, with no card or checkout; it returns `checkout_url: null`. Free has 1000 GB outbound traffic per month and no daily backups. A paid plan returns `checkout_url`:
open it in a browser and pay; the instance is provisioned as soon as the payment page returns and
the response''s `instance_id` is valid from the start (poll `GET /instances/{id}` - its `status` goes
`awaiting_payment` → `pending` → `creating` → `running`; `payment_failed` if the card was declined,
`error` if creation failed). A coupon that covers the whole first month skips the page. Every paid
purchase goes through the hosted page, card on file or not. Where the trial is offered (`GET /plans` →
`trial`), a customer''s first Mini starts with a 14-day free trial and the response says `trial: true`.
With `trial.card = "later"` the instance is created at once (`status: pending`, no `checkout_url`) and it is kept
from the portal''s billing page before the trial ends; without that it pauses and is deleted a week later. What
keeping it costs depends on the gateway: where a card can be verified and held, adding one charges nothing and the
first month is charged when the trial ends; where the provider holds the subscription itself there is no such page,
so keeping the instance is the purchase and the first month is charged at once, ending the trial there. With
`trial.card = "start"`, `checkout_url` verifies the card first (a temporary $1 authorisation that is released) and
the first month is charged when the trial ends.
**Slow operations are jobs.** Reset, restore, rotate, allowlist, upgrade, SQL console and delete
answer `202` with a `job_id`; one job runs per instance at a time and the instance answers `409`
while one is queued or running. Destructive actions (reset, restore, delete) require
`confirm` to equal the instance id. (The portal asks for the instance''s name instead, since that is what a
person knows; either is accepted.)
The same operations are available to AI agents over MCP: the server is the MCP host itself, no path.'
version: '1.0'
servers:
- url: /api/v1
tags:
- name: Account
paths:
/me:
get:
tags:
- Account
summary: The account behind this key
operationId: me_me_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
additionalProperties: true
type: object
title: Response Me Me Get
patch:
tags:
- Account
summary: Update the profile (what goes on receipts)
operationId: me_patch_me_patch
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccountPatch'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
additionalProperties: true
type: object
title: Response Me Patch Me Patch
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/billing:
get:
tags:
- Account
summary: Subscriptions and charges
operationId: billing_billing_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
additionalProperties: true
type: object
title: Response Billing Billing Get
components:
schemas:
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
AccountPatch:
properties:
name:
anyOf:
- type: string
- type: 'null'
title: Name
description: Full name; required before the first purchase (it goes on receipts).
company:
anyOf:
- type: string
- type: 'null'
title: Company
description: Printed on receipts instead of the name when set.
tax_id:
anyOf:
- type: string
- type: 'null'
title: Tax Id
address:
anyOf:
- type: string
- type: 'null'
title: Address
country:
anyOf:
- type: string
- type: 'null'
title: Country
phone:
anyOf:
- type: string
- type: 'null'
title: Phone
type: object
title: AccountPatch