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.
openapi: 3.2.0
info:
title: 법마디(Lawmadi) OS — Korean Legal AI Pricing API
description: 법마디(Lawmadi) OS — Korean Legal AI with 60 specialized agents and real-time statute verification via law.go.kr. Login grants 10 free credits one time (non-recurring). Korean & English.
version: 60.0.1
contact:
email: admin@lawmadi.com
termsOfService: https://lawmadi.com/terms
servers:
- url: https://lawmadi.com
description: Production
tags:
- name: Pricing
paths:
/plans:
get:
tags:
- Pricing
summary: Pricing as machine-readable JSON
description: Credit packs, the one-time sign-in bonus, and the fact that anonymous queries are not allowed. This is the pricing source of truth for clients.
responses:
'200':
description: Metadata document (JSON)
operationId: getPlans
x-operation-id-source: derived
/x402/credits:
post:
tags:
- Pricing
summary: Buy credits with an on-chain payment (x402)
description: '**Returns 501 while no on-chain wallet is configured.** When enabled: authenticate first (401 comes before 402 — paying before we can identify an account would take the payment with nothing to credit), then the first call returns 402 with paymentRequirements and you retry with the `X-PAYMENT` header. Each payment proof credits exactly once; a reused proof gets 409, not another 402.'
security:
- apiKey: []
- oauth2:
- mcp
responses:
'200':
description: Credits added
'401':
description: Authentication required before payment
'402':
description: Payment required — body carries paymentRequirements
'409':
description: This payment proof was already used
'501':
description: x402 is implemented but not configured on this server
operationId: postX402Credits
x-operation-id-source: derived
components:
securitySchemes:
apiKey:
type: http
scheme: bearer
description: 'Customer API key — `Authorization: Bearer lmk_live_…`. Issue one after email sign-in at https://lawmadi.com/mcp-key-guide-en, or obtain one through the OAuth flow below (an OAuth access token IS such a key, so quotas and billing behave identically). Costs are not duplicated here: GET /plans returns the current pricing as JSON, and the MCP tool `get_pricing` needs no auth.'
oauth2:
type: oauth2
description: 'Authorization code + PKCE (S256 only). Dynamic client registration is open (RFC 7591). Scope `mcp:read` cannot spend the user''s credits. Server metadata: https://lawmadi.com/.well-known/oauth-authorization-server (RFC 8414); protected resource metadata: https://lawmadi.com/mcp/.well-known/oauth-protected-resource (RFC 9728).'
flows:
authorizationCode:
authorizationUrl: https://lawmadi.com/oauth/authorize
tokenUrl: https://lawmadi.com/oauth/token
scopes:
mcp: Call any tool, including tools that spend credits.
mcp:read: Call tools that never spend credits.