{"openapi":"3.0.3","info":{"title":"LicenseOS API","version":"1.0.0","description":"Instant, signed compliance decisions for AI-generated and creator use of licensed IP. Authenticate with a license token (Bearer). Every decision is HMAC-signed and independently verifiable.","contact":{"name":"LicenseOS","url":"https://licenseos.vercel.app"},"license":{"name":"Proprietary"}},"servers":[{"url":"https://licenseos.vercel.app","description":"This deployment"}],"security":[{"LicenseToken":[]}],"tags":[{"name":"Compliance","description":"Pre-flight clearance and output review."},{"name":"Generation","description":"Licensed generation proxy (clear → generate → review → credential)."},{"name":"Usage","description":"Report metered usage events."},{"name":"Webhooks","description":"Register signed event callbacks."},{"name":"Receipts","description":"Public verification of signed decision receipts + evidence packs."},{"name":"Agent gateway","description":"A2A / HTTP-402 machine-payable per-use licensing for inbound AI agents."},{"name":"Grants","description":"Rights-holder grant lifecycle (programmatic revocation kill-switch)."}],"paths":{"/api/v1/license/check":{"post":{"summary":"Check a planned use against a license policy","description":"The wedge: returns an instant allow / require-review / block decision plus a signed receipt for the planned use of an IP property. Call this before you generate or ship.","security":[{"LicenseToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ipPropertyId":{"type":"string","minLength":1},"useCase":{"type":"string","enum":["personal_private","noncommercial_fan","educational","prototype_demo","low_volume_commercial","game_mod","merch_print","social_content"]},"prompt":{"type":"string","maxLength":8000},"outputType":{"type":"string","enum":["text","image","video","audio","app_screen","mixed"]},"distributionChannel":{"type":"string","enum":["private","web","ios_app","android_app","desktop_app","game","social_media","print","merch_pod","marketplace","broadcast","internal"]},"commercialIntent":{"type":"boolean","default":false},"expectedMonthlyUsers":{"type":"integer","minimum":0},"expectedRevenue":{"type":"number","minimum":0},"territory":{"type":"string","minLength":2,"maxLength":2},"ageRating":{"type":"string"},"hasUserGeneratedContent":{"type":"boolean","default":false},"trainingIntent":{"type":"boolean","default":false},"derivativeIntent":{"type":"boolean","default":false},"assetDownload":{"type":"boolean","default":false}},"required":["ipPropertyId","useCase"],"additionalProperties":false}}}},"responses":{"200":{"description":"A compliance decision with a signed receipt.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Sustained requests allowed per minute."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests remaining in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Epoch seconds when capacity refreshes."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Decision"}}}},"401":{"description":"Missing or invalid license token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Token is not scoped for this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Request failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/license/status":{"get":{"summary":"Inspect the calling token's grant","description":"Returns the license tier, what it allows, usage limits and current usage for the bearer token.","security":[{"LicenseToken":[]}],"responses":{"200":{"description":"The grant status and allowances.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Sustained requests allowed per minute."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests remaining in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Epoch seconds when capacity refreshes."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generic"}}}},"401":{"description":"Missing or invalid license token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"License token has been revoked or suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/assets":{"get":{"summary":"List the licensed IP's assets + per-asset permissions","description":"Discovery: the assets under the IP this token is licensed for, each with the permissions the grant confers (use-as-is/may-modify, display, download, distribute, train).","security":[{"LicenseToken":[]}],"responses":{"200":{"description":"Assets the grant can access.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Sustained requests allowed per minute."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests remaining in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Epoch seconds when capacity refreshes."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generic"}}}},"401":{"description":"Missing or invalid license token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"License token has been revoked or suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/assets/{assetId}":{"get":{"summary":"Deliver a licensed asset (short-lived signed URL)","description":"The gatekeeper: re-checks the grant is live and the tier permits downloads, then returns a short-lived signed URL + the asset's fingerprints. Every delivery is logged for traceability; revocation blocks future deliveries.","security":[{"LicenseToken":[]}],"parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A short-lived delivery URL + permissions.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Sustained requests allowed per minute."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests remaining in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Epoch seconds when capacity refreshes."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generic"}}}},"401":{"description":"Missing or invalid license token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Token is not scoped for this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/license/odrl":{"get":{"summary":"ODRL view of the grant's rights","description":"Machine-readable ODRL Set (permissions / prohibitions / constraints / duties) re-expressing the license policy for the calling token.","security":[{"LicenseToken":[]}],"responses":{"200":{"description":"An ODRL Set.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Sustained requests allowed per minute."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests remaining in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Epoch seconds when capacity refreshes."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generic"}}}},"401":{"description":"Missing or invalid license token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"License token has been revoked or suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/output/review":{"post":{"summary":"Review an actual generated output","description":"Post-flight review of produced text/image/video against the IP policy (with vision for images).","security":[{"LicenseToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ipPropertyId":{"type":"string","minLength":1},"outputType":{"type":"string","enum":["text","image","video","audio","app_screen","mixed"]},"textContent":{"type":"string","maxLength":20000},"promptUsed":{"type":"string","maxLength":8000},"imageDescription":{"type":"string","maxLength":8000},"fileUrl":{"type":"string","format":"uri"},"appContext":{"type":"string","maxLength":2000},"imageBase64":{"type":"string","maxLength":15000000},"imageMimeType":{"type":"string"}},"required":["ipPropertyId","outputType"],"additionalProperties":false}}}},"responses":{"200":{"description":"A compliance decision for the reviewed output.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Sustained requests allowed per minute."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests remaining in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Epoch seconds when capacity refreshes."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Decision"}}}},"401":{"description":"Missing or invalid license token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Token is not scoped for this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Request failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/generate":{"post":{"summary":"Licensed generation proxy","description":"Clears the prompt (pre-flight), generates the asset from an approved provider, reviews the output (post-flight) and — when approved — issues a signed content credential. Images return inline; video is stored and returned as a URL.","security":[{"LicenseToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ipPropertyId":{"type":"string","minLength":1},"useCase":{"type":"string","enum":["personal_private","noncommercial_fan","educational","prototype_demo","low_volume_commercial","game_mod","merch_print","social_content"]},"prompt":{"type":"string","minLength":1,"maxLength":8000},"providerSlug":{"type":"string","minLength":1},"distributionChannel":{"type":"string","enum":["private","web","ios_app","android_app","desktop_app","game","social_media","print","merch_pod","marketplace","broadcast","internal"]},"commercialIntent":{"type":"boolean","default":false},"expectedMonthlyUsers":{"type":"integer","minimum":0},"expectedRevenue":{"type":"number","minimum":0},"territory":{"type":"string","minLength":2,"maxLength":2},"ageRating":{"type":"string"},"trainingIntent":{"type":"boolean","default":false},"derivativeIntent":{"type":"boolean","default":false},"assetDownload":{"type":"boolean","default":false},"euMode":{"type":"boolean","default":false},"videoOutput":{"type":"boolean","default":false}},"required":["ipPropertyId","useCase","prompt","providerSlug"],"additionalProperties":false}}}},"responses":{"200":{"description":"Generation result with pre/post-flight decisions and an optional content credential.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Sustained requests allowed per minute."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests remaining in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Epoch seconds when capacity refreshes."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generic"}}}},"401":{"description":"Missing or invalid license token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Token is not scoped for this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Request failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/usage/report":{"post":{"summary":"Report a metered usage event","description":"Records a generation/display/download/sale event and returns remaining limits + billing status.","security":[{"LicenseToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ipPropertyId":{"type":"string","minLength":1},"eventType":{"type":"string","enum":["generation","display","download","sale","distribution","install","social_post","ugc","other"]},"assetId":{"type":"string"},"userIdHash":{"type":"string"},"region":{"type":"string"},"revenueAmount":{"type":"number","minimum":0},"generatedOutputId":{"type":"string"}},"required":["ipPropertyId","eventType"],"additionalProperties":false}}}},"responses":{"200":{"description":"Accepted usage event with remaining limits.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Sustained requests allowed per minute."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests remaining in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Epoch seconds when capacity refreshes."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generic"}}}},"401":{"description":"Missing or invalid license token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Token is not scoped for this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Request failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/webhooks/register":{"post":{"summary":"Register a signed webhook endpoint","description":"Subscribe an HTTPS URL to lifecycle events (license.revoked, policy.updated, …). The signing secret is returned once; verify deliveries with HMAC-SHA256 over the raw body (x-licenseos-signature).","security":[{"LicenseToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["url","events"],"additionalProperties":false}}}},"responses":{"201":{"description":"Endpoint created (secret shown once).","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Sustained requests allowed per minute."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests remaining in the current window."},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Epoch seconds when capacity refreshes."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generic"}}}},"401":{"description":"Missing or invalid license token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"License token has been revoked or suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Request failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/decisions/verify":{"post":{"summary":"Verify a signed decision receipt","description":"Public, unauthenticated. Confirms a receipt was issued by LicenseOS and is unaltered.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["receipt","signature"],"properties":{"receipt":{"type":"object"},"signature":{"type":"string"}}}}}},"responses":{"200":{"description":"Verification result.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"valid":{"type":"boolean"}}}}}},"422":{"description":"Malformed request.","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/decisions/verify/{id}":{"get":{"summary":"Verify a receipt by its decision/audit id","description":"Public, unauthenticated. Looks up a stored decision by its id (or audit id) and re-verifies its signature, returning the receipt, the license semantics (ODRL), and the load-bearing `valid` boolean. `valid` is true ONLY when the signature checks out AND the underlying grant is still LIVE (status ACTIVE, not expired) AND any keep-subscription is maintained — a REVOKED/SUSPENDED/EXPIRED grant returns valid:false. Never cached (a revoked license must not serve a stale verdict).","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The decision id or its audit-log id."}],"responses":{"200":{"description":"Verification verdict + the signed receipt and license semantics.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"verification":{"type":"string","enum":["verified","mismatch","unstored","unverifiable","expired","revoked"]},"valid":{"type":"boolean","description":"Signature valid AND grant still live AND license maintained."},"grantRevoked":{"type":"boolean"},"receipt":{"type":"object"},"license":{"type":"object","nullable":true}}}}}},"404":{"description":"No decision or receipt found for that id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/receipts/{id}/evidence":{"get":{"summary":"Fetch the machine-readable evidence pack for a receipt","description":"Public, unauthenticated. The artifact an insurer / regulator / court consumes: the signed receipt (re-verifiable against the JWKS without us), the structured license scope, the evidence hashes (policyHash / inputHash / contentHash — pointers, never the prompt or asset), the policy version, a human-readable summary, and the JWKS verify URL.","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The decision id or its audit-log id."}],"responses":{"200":{"description":"The evidence pack.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generic"}}}},"404":{"description":"No decision or receipt found for that id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/decisions/sample":{"get":{"summary":"Fetch a working sample receipt","description":"Public. Returns a real, valid signed receipt (fictional data) so you can test verification.","security":[],"responses":{"200":{"description":"A signed sample receipt.","content":{"application/json":{"schema":{"type":"object","properties":{"receipt":{"type":"object"},"signature":{"type":"string"}}}}}}}}},"/api/v1/suitability/verify":{"post":{"summary":"Verify a signed suitability & clearance certificate","description":"Public, unauthenticated. Confirms a brand suitability/clearance certificate was issued by LicenseOS and is unaltered.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["certificate","signature"],"properties":{"certificate":{"type":"object"},"signature":{"type":"string"}}}}}},"responses":{"200":{"description":"Verification result.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"valid":{"type":"boolean"}}}}}},"422":{"description":"Malformed request."},"429":{"description":"Rate limit exceeded."}}}},"/api/v1/agent/terms":{"get":{"summary":"Quote machine-readable license terms for an AI agent","description":"Public, unauthenticated (A2A / HTTP-402 gateway). An inbound AI agent discovers the price and the exact rights / prohibitions / duties (ODRL-flavored) for an (IP, tier) BEFORE it requests a use — then pays via the 402 flow at /api/v1/agent/clear. See also /.well-known/ai-licensing.json.","security":[],"parameters":[{"name":"ip","in":"query","required":true,"schema":{"type":"string"},"description":"The IP property slug."},{"name":"tier","in":"query","required":true,"schema":{"type":"string"},"description":"The license tier slug."}],"responses":{"200":{"description":"The machine-readable terms.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generic"}}}},"404":{"description":"No such published IP or public tier.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Missing ?ip / ?tier.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/agent/clear":{"post":{"summary":"Clear a per-use license for an AI agent (HTTP-402)","description":"Public, no license token — the agent's PAYMENT is its authorization (A2A / HTTP-402 gateway). Submit { ip, tier, useCase, prompt, … }. With no/invalid X-Payment header it returns 402 with a signed payment-intent challenge + the price; with a valid (single-use, anti-replayed) payment it runs the REAL preflight and returns the decision + a signed per-use receipt + a verifyUrl. A tier that isn't per-use payable in v1 (subscription / revenue-share) returns 409 with terms instead.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["ip","tier","useCase","prompt"],"properties":{"ip":{"type":"string"},"tier":{"type":"string"},"useCase":{"type":"string"},"prompt":{"type":"string"}},"additionalProperties":true}}}},"parameters":[{"name":"X-Payment","in":"header","required":false,"schema":{"type":"string"},"description":"A settled payment proof for the quoted challenge; absent ⇒ 402."}],"responses":{"200":{"description":"Paid + cleared: the decision, signed receipt, and verifyUrl.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generic"}}}},"402":{"description":"Payment required: a signed payment-intent challenge + price.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No such published IP or public tier.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Tier not per-use payable, or the payment intent was already settled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Malformed request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/grants/{id}/revoke":{"post":{"summary":"Revoke a license grant (rights-holder kill switch)","description":"Programmatic equivalent of the dashboard revoke: atomic status → REVOKED, bulk-revoke of the grant's active tokens, an audit entry, and a confirmed license.revoked webhook — so a rights holder can wire revocation into their own abuse-response automation. Authenticated by the rights-holder's logged-in session (owner/admin of the IP's org); idempotent on an already-revoked grant.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The license grant id."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","description":"Optional human-readable revocation reason (≤500 chars)."}}}}}},"responses":{"200":{"description":"Revoked (or already revoked — idempotent).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generic"}}}},"401":{"description":"Not signed in as the rights holder.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Not permitted (owner/admin of the IP's rights-holder org only).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"No such grant (or not owned by your org).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}},"components":{"securitySchemes":{"LicenseToken":{"type":"http","scheme":"bearer","description":"A LicenseOS license token (llk_live_… or llk_test_…), issued per grant."}},"schemas":{"ApiError":{"type":"object","properties":{"ok":{"type":"boolean","example":false},"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","token_revoked","forbidden","not_found","invalid_request","rate_limited","server_error"]},"message":{"type":"string"},"detail":{"nullable":true}}}}},"Generic":{"type":"object","properties":{"ok":{"type":"boolean","example":true}},"additionalProperties":true},"Decision":{"type":"object","properties":{"ok":{"type":"boolean","example":true},"approved":{"type":"boolean"},"decision":{"type":"string","enum":["allow","require_review","block"]},"riskScore":{"type":"number"},"humanReviewRequired":{"type":"boolean"},"licenseTier":{"type":"string","nullable":true},"requiredAttribution":{"type":"string","nullable":true},"requiredChanges":{"type":"array","items":{"type":"string"}},"rationale":{"type":"string"},"policyVersion":{"type":"integer"},"auditId":{"type":"string","nullable":true},"receipt":{"type":"object","nullable":true},"receiptSignature":{"type":"string","nullable":true}}}}}}