{"openapi":"3.1.0","info":{"title":"ZapytajKodeks API","version":"1.1.0","description":"Polish legal data and AI research under one REST API. Separate request and AI analysis counters, shared per approved key owner. Every protected data or account endpoint consumes one request; analysis and quote extraction each consume one AI analysis. Prices and manual access: https://zapytajkodeks.pl/api. Integration guide: https://zapytajkodeks.pl/dokumentacje/api. MCP remains a separate OAuth service and is not charged to these REST pools."},"servers":[{"url":"https://api.zapytajkodeks.pl","description":"Production"}],"tags":[{"name":"Data"},{"name":"AI"},{"name":"Account"},{"name":"Widget"}],"components":{"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"API key in format: zk_live_xxxxx.yyyyy"},"WidgetSession":{"type":"http","scheme":"bearer","bearerFormat":"zkw1 session token","description":"Short-lived token issued by /widget/sessions, never the private API key."}}},"paths":{"/api/v1/provisions/search":{"post":{"operationId":"provisionSearch","summary":"Wyszukaj przepisy","tags":["Data"],"security":[{"Bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"1–128 characters [A-Za-z0-9._:-]. Scoped to API key and operation. A retry returns 409 and never re-executes; no response replay. The fingerprint uses normalized validated input.","schema":{"type":"string","maxLength":128}},{"name":"X-Processing-Profile","in":"header","required":false,"description":"Only standard is available. eea_zero_retention returns 501 before downstream execution.","schema":{"type":"string","enum":["standard","eea_zero_retention"],"default":"standard"}}],"description":"Cost: 1 request. Multiple search queries and full act retrieval still count as one request. Source-not-found and server failures release the reservation. A completed search with no matches or quote check with no match is billable.","x-usage-meter":"data","x-usage-units":1,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"type":"string","minLength":2,"maxLength":500,"description":"Natural-language legal search query, between 2 and 500 characters."},"actName":{"description":"Optional Polish act or regulation name.","type":"string","minLength":2,"maxLength":300},"instrumentTypes":{"description":"Allowed legal instrument types.","minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["PL_ACT","PL_REGULATION","EU_REGULATION"]}},"includeAnnexes":{"description":"Whether annex provisions may be returned.","type":"boolean"},"mode":{"description":"Search mode. Omit to use the service default (hybrid).","type":"string","enum":["hybrid","semantic","lexical"]},"limit":{"description":"Maximum number of results, from 1 to 20.","type":"integer","minimum":1,"maximum":20}},"required":["query"],"additionalProperties":false}}}},"responses":{"200":{"description":"Completed operation","headers":{"X-Request-Id":{"description":"Server request UUID","schema":{"type":"string"}},"X-Usage-Meter":{"description":"data or ai","schema":{"type":"string"}},"X-Usage-Units":{"description":"Counted requests (1 on success, 0 when refunded)","schema":{"type":"string"}},"X-Usage-Limit":{"description":"Limit for the active period","schema":{"type":"string"}},"X-Usage-Remaining":{"description":"Remaining quota at reservation time, including in-flight reservations","schema":{"type":"string"}},"X-Usage-Resets-At":{"description":"Current period end; renewal is approved by the operator","schema":{"type":"string"}},"X-Processing-Profile":{"description":"Effective backend processing profile","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"schemaVersion":{"type":"string","const":"1.0"},"items":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"schemaVersion":{"type":"string","const":"1.0"},"sourceType":{"type":"string","const":"provision"},"id":{"type":"string","minLength":1,"maxLength":200},"title":{"type":"string","minLength":1,"maxLength":1000},"citation":{"type":"string","minLength":1,"maxLength":500},"jurisdiction":{"type":"string","enum":["PL","EU"]},"canonicalUrl":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"contentKind":{"type":"string","const":"verbatim"},"details":{"type":"object","properties":{"provisionId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"number":{"type":"string","minLength":1,"maxLength":100},"index":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"provisionType":{"type":"string","minLength":1,"maxLength":100},"instrument":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string","minLength":1,"maxLength":1000},"shortTitle":{"type":"string","maxLength":500},"editionId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["PL_ACT","PL_REGULATION","EU_REGULATION"]}},"required":["id","title","shortTitle","editionId","type"],"additionalProperties":false}},"required":["provisionId","number","index","provisionType","instrument"],"additionalProperties":false},"text":{"type":"string","minLength":1,"maxLength":250000}},"required":["schemaVersion","sourceType","id","title","citation","jurisdiction","canonicalUrl","contentKind","details","text"],"additionalProperties":false}},"appliedFilters":{"type":"object","properties":{"actName":{"description":"Optional Polish act or regulation name.","type":"string","minLength":2,"maxLength":300},"instrumentTypes":{"description":"Allowed legal instrument types.","minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["PL_ACT","PL_REGULATION","EU_REGULATION"]}},"includeAnnexes":{"description":"Whether annex provisions may be returned.","type":"boolean"},"mode":{"description":"Search mode. Omit to use the service default (hybrid).","type":"string","enum":["hybrid","semantic","lexical"]},"limit":{"description":"Maximum number of results, from 1 to 20.","type":"integer","minimum":1,"maximum":20}},"additionalProperties":false},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":1000}},"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED","LIMIT_REACHED","INVALID_FILTER","SOURCE_NOT_FOUND","QUOTE_NOT_FOUND","INTERNAL_ERROR"]},"message":{"type":"string","minLength":1,"maxLength":1000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","items","appliedFilters","warnings"],"additionalProperties":false}}}},"400":{"description":"Invalid JSON or parameters","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"401":{"description":"Invalid or missing Bearer key","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"Unapproved, suspended or expired access","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"409":{"description":"Idempotency key already accepted or reused with different input","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"413":{"description":"Body exceeds 2 MB","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"429":{"description":"Quota, rolling rate or AI concurrency limit exceeded","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"501":{"description":"Requested processing profile unavailable","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"504":{"description":"AI operation exceeded its time limit","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/provisions/lookup":{"post":{"operationId":"provisionLookup","summary":"Pobierz przepis po identyfikatorze lub adresie","tags":["Data"],"security":[{"Bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"1–128 characters [A-Za-z0-9._:-]. Scoped to API key and operation. A retry returns 409 and never re-executes; no response replay. The fingerprint uses normalized validated input.","schema":{"type":"string","maxLength":128}},{"name":"X-Processing-Profile","in":"header","required":false,"description":"Only standard is available. eea_zero_retention returns 501 before downstream execution.","schema":{"type":"string","enum":["standard","eea_zero_retention"],"default":"standard"}}],"description":"Cost: 1 request. Multiple search queries and full act retrieval still count as one request. Source-not-found and server failures release the reservation. A completed search with no matches or quote check with no match is billable.","x-usage-meter":"data","x-usage-units":1,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sourceId":{"type":"string","maxLength":200,"pattern":"^(provision|judgment):[1-9]\\d*$"},"provisionId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"actName":{"description":"Polish act or regulation name.","type":"string","minLength":2,"maxLength":300},"articleNumber":{"description":"Provision number, for example '415' or '132^1'.","type":"string","minLength":1,"maxLength":50}},"additionalProperties":false}}}},"responses":{"200":{"description":"Completed operation","headers":{"X-Request-Id":{"description":"Server request UUID","schema":{"type":"string"}},"X-Usage-Meter":{"description":"data or ai","schema":{"type":"string"}},"X-Usage-Units":{"description":"Counted requests (1 on success, 0 when refunded)","schema":{"type":"string"}},"X-Usage-Limit":{"description":"Limit for the active period","schema":{"type":"string"}},"X-Usage-Remaining":{"description":"Remaining quota at reservation time, including in-flight reservations","schema":{"type":"string"}},"X-Usage-Resets-At":{"description":"Current period end; renewal is approved by the operator","schema":{"type":"string"}},"X-Processing-Profile":{"description":"Effective backend processing profile","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"schemaVersion":{"type":"string","const":"1.0"},"source":{"anyOf":[{"type":"object","properties":{"schemaVersion":{"type":"string","const":"1.0"},"sourceType":{"type":"string","const":"provision"},"id":{"type":"string","minLength":1,"maxLength":200},"title":{"type":"string","minLength":1,"maxLength":1000},"citation":{"type":"string","minLength":1,"maxLength":500},"jurisdiction":{"type":"string","enum":["PL","EU"]},"canonicalUrl":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"contentKind":{"type":"string","const":"verbatim"},"details":{"type":"object","properties":{"provisionId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"number":{"type":"string","minLength":1,"maxLength":100},"index":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"provisionType":{"type":"string","minLength":1,"maxLength":100},"instrument":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string","minLength":1,"maxLength":1000},"shortTitle":{"type":"string","maxLength":500},"editionId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["PL_ACT","PL_REGULATION","EU_REGULATION"]}},"required":["id","title","shortTitle","editionId","type"],"additionalProperties":false}},"required":["provisionId","number","index","provisionType","instrument"],"additionalProperties":false},"text":{"type":"string","minLength":1,"maxLength":250000}},"required":["schemaVersion","sourceType","id","title","citation","jurisdiction","canonicalUrl","contentKind","details","text"],"additionalProperties":false},{"type":"null"}]},"appliedFilters":{"type":"object","properties":{"sourceId":{"description":"Opcjonalny identyfikator z wyszukiwania. Nie pokazuj go użytkownikowi.","type":"string","pattern":"^provision:\\d+$"},"provisionId":{"description":"Internal provision ID returned by a previous search.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"actName":{"description":"Polish act or regulation name.","type":"string","minLength":2,"maxLength":300},"articleNumber":{"description":"Provision number, for example '415' or '132^1'.","type":"string","minLength":1,"maxLength":50}},"additionalProperties":false},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":1000}},"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED","LIMIT_REACHED","INVALID_FILTER","SOURCE_NOT_FOUND","QUOTE_NOT_FOUND","INTERNAL_ERROR"]},"message":{"type":"string","minLength":1,"maxLength":1000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","source","appliedFilters","warnings"],"additionalProperties":false}}}},"400":{"description":"Invalid JSON or parameters","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"401":{"description":"Invalid or missing Bearer key","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"Unapproved, suspended or expired access","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"409":{"description":"Idempotency key already accepted or reused with different input","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"413":{"description":"Body exceeds 2 MB","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"429":{"description":"Quota, rolling rate or AI concurrency limit exceeded","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"501":{"description":"Requested processing profile unavailable","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"504":{"description":"AI operation exceeded its time limit","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/provisions/{id}":{"get":{"operationId":"provisionGet","summary":"Pobierz tekst przepisu","tags":["Data"],"security":[{"Bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"1–128 characters [A-Za-z0-9._:-]. Scoped to API key and operation. A retry returns 409 and never re-executes; no response replay. The fingerprint uses normalized validated input.","schema":{"type":"string","maxLength":128}},{"name":"X-Processing-Profile","in":"header","required":false,"description":"Only standard is available. eea_zero_retention returns 501 before downstream execution.","schema":{"type":"string","enum":["standard","eea_zero_retention"],"default":"standard"}},{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991}}],"description":"Cost: 1 request. Multiple search queries and full act retrieval still count as one request. Source-not-found and server failures release the reservation. A completed search with no matches or quote check with no match is billable.","x-usage-meter":"data","x-usage-units":1,"responses":{"200":{"description":"Completed operation","headers":{"X-Request-Id":{"description":"Server request UUID","schema":{"type":"string"}},"X-Usage-Meter":{"description":"data or ai","schema":{"type":"string"}},"X-Usage-Units":{"description":"Counted requests (1 on success, 0 when refunded)","schema":{"type":"string"}},"X-Usage-Limit":{"description":"Limit for the active period","schema":{"type":"string"}},"X-Usage-Remaining":{"description":"Remaining quota at reservation time, including in-flight reservations","schema":{"type":"string"}},"X-Usage-Resets-At":{"description":"Current period end; renewal is approved by the operator","schema":{"type":"string"}},"X-Processing-Profile":{"description":"Effective backend processing profile","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"schemaVersion":{"type":"string","const":"1.0"},"source":{"anyOf":[{"type":"object","properties":{"schemaVersion":{"type":"string","const":"1.0"},"sourceType":{"type":"string","const":"provision"},"id":{"type":"string","minLength":1,"maxLength":200},"title":{"type":"string","minLength":1,"maxLength":1000},"citation":{"type":"string","minLength":1,"maxLength":500},"jurisdiction":{"type":"string","enum":["PL","EU"]},"canonicalUrl":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"contentKind":{"type":"string","const":"verbatim"},"details":{"type":"object","properties":{"provisionId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"number":{"type":"string","minLength":1,"maxLength":100},"index":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"provisionType":{"type":"string","minLength":1,"maxLength":100},"instrument":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string","minLength":1,"maxLength":1000},"shortTitle":{"type":"string","maxLength":500},"editionId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["PL_ACT","PL_REGULATION","EU_REGULATION"]}},"required":["id","title","shortTitle","editionId","type"],"additionalProperties":false}},"required":["provisionId","number","index","provisionType","instrument"],"additionalProperties":false},"text":{"type":"string","minLength":1,"maxLength":250000}},"required":["schemaVersion","sourceType","id","title","citation","jurisdiction","canonicalUrl","contentKind","details","text"],"additionalProperties":false},{"type":"null"}]},"appliedFilters":{"type":"object","properties":{"sourceId":{"description":"Opcjonalny identyfikator z wyszukiwania. Nie pokazuj go użytkownikowi.","type":"string","pattern":"^provision:\\d+$"},"provisionId":{"description":"Internal provision ID returned by a previous search.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"actName":{"description":"Polish act or regulation name.","type":"string","minLength":2,"maxLength":300},"articleNumber":{"description":"Provision number, for example '415' or '132^1'.","type":"string","minLength":1,"maxLength":50}},"additionalProperties":false},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":1000}},"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED","LIMIT_REACHED","INVALID_FILTER","SOURCE_NOT_FOUND","QUOTE_NOT_FOUND","INTERNAL_ERROR"]},"message":{"type":"string","minLength":1,"maxLength":1000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","source","appliedFilters","warnings"],"additionalProperties":false}}}},"400":{"description":"Invalid JSON or parameters","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"401":{"description":"Invalid or missing Bearer key","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"Unapproved, suspended or expired access","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"409":{"description":"Idempotency key already accepted or reused with different input","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"413":{"description":"Body exceeds 2 MB","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"429":{"description":"Quota, rolling rate or AI concurrency limit exceeded","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"501":{"description":"Requested processing profile unavailable","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"504":{"description":"AI operation exceeded its time limit","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/judgments/search":{"post":{"operationId":"judgmentSearch","summary":"Wyszukaj orzeczenia i gotowe opracowania AI","tags":["Data"],"security":[{"Bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"1–128 characters [A-Za-z0-9._:-]. Scoped to API key and operation. A retry returns 409 and never re-executes; no response replay. The fingerprint uses normalized validated input.","schema":{"type":"string","maxLength":128}},{"name":"X-Processing-Profile","in":"header","required":false,"description":"Only standard is available. eea_zero_retention returns 501 before downstream execution.","schema":{"type":"string","enum":["standard","eea_zero_retention"],"default":"standard"}}],"description":"Cost: 1 request. Multiple search queries and full act retrieval still count as one request. Source-not-found and server failures release the reservation. A completed search with no matches or quote check with no match is billable.","x-usage-meter":"data","x-usage-units":1,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"queries":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","minLength":2,"maxLength":500,"description":"Natural-language legal search query, between 2 and 500 characters."},"description":"One to five distinct legal search queries."},"courtTypes":{"description":"Allowed court categories.","minItems":1,"maxItems":6,"type":"array","items":{"type":"string","enum":["CONSTITUTIONAL_TRIBUNAL","SUPREME","COMMON","SUPREME_ADMINISTRATIVE_COURT","VOIVODESHIP_ADMINISTRATIVE_COURT","NATIONAL_APPEAL_CHAMBER"]}},"commonCourtLevels":{"description":"Allowed tiers when courtTypes includes COMMON.","minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["appeal","regional","district"]}},"dateFrom":{"description":"Earliest judgment date, inclusive (YYYY-MM-DD).","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"dateTo":{"description":"Latest judgment date, inclusive (YYYY-MM-DD).","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"caseNumber":{"description":"Exact court case number.","type":"string","minLength":2,"maxLength":100},"courtName":{"description":"Exact or partial Polish court name.","type":"string","minLength":2,"maxLength":300},"mode":{"description":"Search mode. Omit to use the service default (hybrid).","type":"string","enum":["hybrid","semantic","lexical"]},"limit":{"description":"Maximum number of results, from 1 to 20.","type":"integer","minimum":1,"maximum":20}},"required":["queries"],"additionalProperties":false}}}},"responses":{"200":{"description":"Completed operation","headers":{"X-Request-Id":{"description":"Server request UUID","schema":{"type":"string"}},"X-Usage-Meter":{"description":"data or ai","schema":{"type":"string"}},"X-Usage-Units":{"description":"Counted requests (1 on success, 0 when refunded)","schema":{"type":"string"}},"X-Usage-Limit":{"description":"Limit for the active period","schema":{"type":"string"}},"X-Usage-Remaining":{"description":"Remaining quota at reservation time, including in-flight reservations","schema":{"type":"string"}},"X-Usage-Resets-At":{"description":"Current period end; renewal is approved by the operator","schema":{"type":"string"}},"X-Processing-Profile":{"description":"Effective backend processing profile","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"schemaVersion":{"type":"string","const":"1.0"},"items":{"maxItems":20,"type":"array","items":{"oneOf":[{"type":"object","properties":{"schemaVersion":{"type":"string","const":"1.0"},"sourceType":{"type":"string","const":"judgment"},"id":{"type":"string","minLength":1,"maxLength":200},"title":{"type":"string","minLength":1,"maxLength":1000},"citation":{"type":"string","minLength":1,"maxLength":500},"jurisdiction":{"type":"string","enum":["PL","EU"]},"canonicalUrl":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"contentKind":{"type":"string","const":"ai_summary"},"details":{"type":"object","properties":{"judgmentId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"courtType":{"type":"string","enum":["CONSTITUTIONAL_TRIBUNAL","SUPREME","COMMON","SUPREME_ADMINISTRATIVE_COURT","VOIVODESHIP_ADMINISTRATIVE_COURT","NATIONAL_APPEAL_CHAMBER"]},"courtLevel":{"anyOf":[{"type":"string","enum":["appeal","regional","district"]},{"type":"null"}]},"caseNumbers":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"judgmentType":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"judgmentDate":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"courtName":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"divisionName":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"aiAnalysis":{"anyOf":[{"type":"object","properties":{"factualBackground":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"legalReasoning":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"decision":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]}},"required":["factualBackground","legalReasoning","decision"],"additionalProperties":false},{"type":"null"}]},"aiTheses":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":20000}}},"required":["judgmentId","courtType","courtLevel","caseNumbers","judgmentType","judgmentDate","courtName","divisionName","aiAnalysis","aiTheses"],"additionalProperties":false}},"required":["schemaVersion","sourceType","id","title","citation","jurisdiction","canonicalUrl","contentKind","details"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"string","const":"1.0"},"sourceType":{"type":"string","const":"judgment"},"id":{"type":"string","minLength":1,"maxLength":200},"title":{"type":"string","minLength":1,"maxLength":1000},"citation":{"type":"string","minLength":1,"maxLength":500},"jurisdiction":{"type":"string","enum":["PL","EU"]},"canonicalUrl":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"contentKind":{"type":"string","const":"excerpt"},"details":{"type":"object","properties":{"judgmentId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"courtType":{"type":"string","enum":["CONSTITUTIONAL_TRIBUNAL","SUPREME","COMMON","SUPREME_ADMINISTRATIVE_COURT","VOIVODESHIP_ADMINISTRATIVE_COURT","NATIONAL_APPEAL_CHAMBER"]},"courtLevel":{"anyOf":[{"type":"string","enum":["appeal","regional","district"]},{"type":"null"}]},"caseNumbers":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"judgmentType":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"judgmentDate":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"courtName":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"divisionName":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"aiAnalysis":{"anyOf":[{"type":"object","properties":{"factualBackground":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"legalReasoning":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"decision":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]}},"required":["factualBackground","legalReasoning","decision"],"additionalProperties":false},{"type":"null"}]},"aiTheses":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":20000}}},"required":["judgmentId","courtType","courtLevel","caseNumbers","judgmentType","judgmentDate","courtName","divisionName","aiAnalysis","aiTheses"],"additionalProperties":false},"text":{"type":"string","minLength":1,"maxLength":250000}},"required":["schemaVersion","sourceType","id","title","citation","jurisdiction","canonicalUrl","contentKind","details","text"],"additionalProperties":false}]}},"appliedFilters":{"type":"object","properties":{"courtTypes":{"maxItems":6,"type":"array","items":{"type":"string","enum":["CONSTITUTIONAL_TRIBUNAL","SUPREME","COMMON","SUPREME_ADMINISTRATIVE_COURT","VOIVODESHIP_ADMINISTRATIVE_COURT","NATIONAL_APPEAL_CHAMBER"]}},"commonCourtLevels":{"maxItems":3,"type":"array","items":{"type":"string","enum":["appeal","regional","district"]}},"dateFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"ISO calendar date in YYYY-MM-DD format."},"dateTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"ISO calendar date in YYYY-MM-DD format."},"caseNumber":{"type":"string","maxLength":100},"courtName":{"type":"string","maxLength":300},"mode":{"description":"Search mode. Omit to use the service default (hybrid).","type":"string","enum":["hybrid","semantic","lexical"]},"limit":{"description":"Maximum number of results, from 1 to 20.","type":"integer","minimum":1,"maximum":20}},"additionalProperties":false},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":1000}},"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED","LIMIT_REACHED","INVALID_FILTER","SOURCE_NOT_FOUND","QUOTE_NOT_FOUND","INTERNAL_ERROR"]},"message":{"type":"string","minLength":1,"maxLength":1000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","items","appliedFilters","warnings"],"additionalProperties":false}}}},"400":{"description":"Invalid JSON or parameters","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"401":{"description":"Invalid or missing Bearer key","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"Unapproved, suspended or expired access","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"409":{"description":"Idempotency key already accepted or reused with different input","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"413":{"description":"Body exceeds 2 MB","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"429":{"description":"Quota, rolling rate or AI concurrency limit exceeded","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"501":{"description":"Requested processing profile unavailable","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"504":{"description":"AI operation exceeded its time limit","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/judgments/{id}":{"get":{"operationId":"judgmentGet","summary":"Pobierz pełny tekst orzeczenia","tags":["Data"],"security":[{"Bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"1–128 characters [A-Za-z0-9._:-]. Scoped to API key and operation. A retry returns 409 and never re-executes; no response replay. The fingerprint uses normalized validated input.","schema":{"type":"string","maxLength":128}},{"name":"X-Processing-Profile","in":"header","required":false,"description":"Only standard is available. eea_zero_retention returns 501 before downstream execution.","schema":{"type":"string","enum":["standard","eea_zero_retention"],"default":"standard"}},{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991}}],"description":"Cost: 1 request. Multiple search queries and full act retrieval still count as one request. Source-not-found and server failures release the reservation. A completed search with no matches or quote check with no match is billable.","x-usage-meter":"data","x-usage-units":1,"responses":{"200":{"description":"Completed operation","headers":{"X-Request-Id":{"description":"Server request UUID","schema":{"type":"string"}},"X-Usage-Meter":{"description":"data or ai","schema":{"type":"string"}},"X-Usage-Units":{"description":"Counted requests (1 on success, 0 when refunded)","schema":{"type":"string"}},"X-Usage-Limit":{"description":"Limit for the active period","schema":{"type":"string"}},"X-Usage-Remaining":{"description":"Remaining quota at reservation time, including in-flight reservations","schema":{"type":"string"}},"X-Usage-Resets-At":{"description":"Current period end; renewal is approved by the operator","schema":{"type":"string"}},"X-Processing-Profile":{"description":"Effective backend processing profile","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"schemaVersion":{"type":"string","const":"1.0"},"source":{"type":"object","properties":{"schemaVersion":{"type":"string","const":"1.0"},"sourceType":{"type":"string","const":"judgment"},"id":{"type":"string","minLength":1,"maxLength":200},"title":{"type":"string","minLength":1,"maxLength":1000},"citation":{"type":"string","minLength":1,"maxLength":500},"jurisdiction":{"type":"string","enum":["PL","EU"]},"canonicalUrl":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"contentKind":{"type":"string","const":"verbatim"},"details":{"type":"object","properties":{"judgmentId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"courtType":{"type":"string","enum":["CONSTITUTIONAL_TRIBUNAL","SUPREME","COMMON","SUPREME_ADMINISTRATIVE_COURT","VOIVODESHIP_ADMINISTRATIVE_COURT","NATIONAL_APPEAL_CHAMBER"]},"courtLevel":{"anyOf":[{"type":"string","enum":["appeal","regional","district"]},{"type":"null"}]},"caseNumbers":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"judgmentType":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"judgmentDate":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"courtName":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"divisionName":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"aiAnalysis":{"anyOf":[{"type":"object","properties":{"factualBackground":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"legalReasoning":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]},"decision":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]}},"required":["factualBackground","legalReasoning","decision"],"additionalProperties":false},{"type":"null"}]},"aiTheses":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":20000}}},"required":["judgmentId","courtType","courtLevel","caseNumbers","judgmentType","judgmentDate","courtName","divisionName","aiAnalysis","aiTheses"],"additionalProperties":false},"text":{"type":"string"},"textFormat":{"type":"string","const":"plain"}},"required":["schemaVersion","sourceType","id","title","citation","jurisdiction","canonicalUrl","contentKind","details","text","textFormat"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}}},"required":["schemaVersion","source","warnings"],"additionalProperties":false}}}},"400":{"description":"Invalid JSON or parameters","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"401":{"description":"Invalid or missing Bearer key","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"Unapproved, suspended or expired access","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"409":{"description":"Idempotency key already accepted or reused with different input","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"413":{"description":"Body exceeds 2 MB","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"429":{"description":"Quota, rolling rate or AI concurrency limit exceeded","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"501":{"description":"Requested processing profile unavailable","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"504":{"description":"AI operation exceeded its time limit","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/acts/{id}/editions":{"get":{"operationId":"actEditions","summary":"Lista dostępnych wersji aktu","tags":["Data"],"security":[{"Bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"1–128 characters [A-Za-z0-9._:-]. Scoped to API key and operation. A retry returns 409 and never re-executes; no response replay. The fingerprint uses normalized validated input.","schema":{"type":"string","maxLength":128}},{"name":"X-Processing-Profile","in":"header","required":false,"description":"Only standard is available. eea_zero_retention returns 501 before downstream execution.","schema":{"type":"string","enum":["standard","eea_zero_retention"],"default":"standard"}},{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991}}],"description":"Cost: 1 request. Multiple search queries and full act retrieval still count as one request. Source-not-found and server failures release the reservation. A completed search with no matches or quote check with no match is billable.","x-usage-meter":"data","x-usage-units":1,"responses":{"200":{"description":"Completed operation","headers":{"X-Request-Id":{"description":"Server request UUID","schema":{"type":"string"}},"X-Usage-Meter":{"description":"data or ai","schema":{"type":"string"}},"X-Usage-Units":{"description":"Counted requests (1 on success, 0 when refunded)","schema":{"type":"string"}},"X-Usage-Limit":{"description":"Limit for the active period","schema":{"type":"string"}},"X-Usage-Remaining":{"description":"Remaining quota at reservation time, including in-flight reservations","schema":{"type":"string"}},"X-Usage-Resets-At":{"description":"Current period end; renewal is approved by the operator","schema":{"type":"string"}},"X-Processing-Profile":{"description":"Effective backend processing profile","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"schemaVersion":{"type":"string","const":"1.0"},"instrumentId":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"instrumentId":{"type":"number"},"publicationDate":{"type":"string"},"sourceRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"editionKind":{"type":"string"},"editionStatus":{"type":"string"},"basedOnConsolidated":{"anyOf":[{"type":"object","properties":{"sourceRef":{"type":"string"},"publicationDate":{"type":"string"}},"required":["sourceRef","publicationDate"],"additionalProperties":false},{"type":"null"}]}},"required":["id","instrumentId","publicationDate","sourceRef","sourceUrl","editionKind","editionStatus"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["schemaVersion","instrumentId","items","warnings"],"additionalProperties":false}}}},"400":{"description":"Invalid JSON or parameters","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"401":{"description":"Invalid or missing Bearer key","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"Unapproved, suspended or expired access","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"409":{"description":"Idempotency key already accepted or reused with different input","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"413":{"description":"Body exceeds 2 MB","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"429":{"description":"Quota, rolling rate or AI concurrency limit exceeded","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"501":{"description":"Requested processing profile unavailable","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"504":{"description":"AI operation exceeded its time limit","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/acts/{id}":{"get":{"operationId":"actGet","summary":"Pełna struktura wskazanej wersji aktu","tags":["Data"],"security":[{"Bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"1–128 characters [A-Za-z0-9._:-]. Scoped to API key and operation. A retry returns 409 and never re-executes; no response replay. The fingerprint uses normalized validated input.","schema":{"type":"string","maxLength":128}},{"name":"X-Processing-Profile","in":"header","required":false,"description":"Only standard is available. eea_zero_retention returns 501 before downstream execution.","schema":{"type":"string","enum":["standard","eea_zero_retention"],"default":"standard"}},{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"editionId","in":"query","required":true,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991}}],"description":"Cost: 1 request. Multiple search queries and full act retrieval still count as one request. Source-not-found and server failures release the reservation. A completed search with no matches or quote check with no match is billable.","x-usage-meter":"data","x-usage-units":1,"responses":{"200":{"description":"Completed operation","headers":{"X-Request-Id":{"description":"Server request UUID","schema":{"type":"string"}},"X-Usage-Meter":{"description":"data or ai","schema":{"type":"string"}},"X-Usage-Units":{"description":"Counted requests (1 on success, 0 when refunded)","schema":{"type":"string"}},"X-Usage-Limit":{"description":"Limit for the active period","schema":{"type":"string"}},"X-Usage-Remaining":{"description":"Remaining quota at reservation time, including in-flight reservations","schema":{"type":"string"}},"X-Usage-Resets-At":{"description":"Current period end; renewal is approved by the operator","schema":{"type":"string"}},"X-Processing-Profile":{"description":"Effective backend processing profile","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"schemaVersion":{"type":"string","const":"1.0"},"source":{"type":"object","properties":{"id":{"type":"string"},"sourceType":{"type":"string","const":"act"},"contentKind":{"type":"string","const":"verbatim"},"textFormat":{"type":"string","const":"html"},"instrument":{"type":"object","properties":{"id":{"type":"number"},"title":{"type":"string"},"shortTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"instrumentType":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","title","shortTitle","status","instrumentType"],"additionalProperties":false},"edition":{"type":"object","properties":{"id":{"type":"number"},"instrumentId":{"type":"number"},"publicationDate":{"type":"string"},"sourceRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"editionKind":{"type":"string"},"editionStatus":{"type":"string"},"basedOnConsolidated":{"anyOf":[{"type":"object","properties":{"sourceRef":{"type":"string"},"publicationDate":{"type":"string"}},"required":["sourceRef","publicationDate"],"additionalProperties":false},{"type":"null"}]}},"required":["id","instrumentId","publicationDate","sourceRef","sourceUrl","editionKind","editionStatus"],"additionalProperties":false},"structureNodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"parentId":{"anyOf":[{"type":"number"},{"type":"null"}]},"nodeType":{"type":"string"},"name":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","parentId","nodeType","name","title"],"additionalProperties":false}},"provisions":{"type":"array","items":{"type":"object","properties":{"provisionId":{"type":"number"},"provisionType":{"type":"string"},"number":{"type":"string"},"index":{"anyOf":[{"type":"string"},{"type":"null"}]},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"nodeId":{"anyOf":[{"type":"number"},{"type":"null"}]},"state":{"type":"string"},"pendingStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"effectiveDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentHtml":{"type":"string"},"annotations":{"type":"array","items":{"type":"object","properties":{"customId":{"type":"string"},"kind":{"anyOf":[{"type":"string","enum":["FUTURE","CURRENT"]},{"type":"null"}]},"effectiveDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"legalBasis":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["customId","kind","effectiveDate","legalBasis","text"],"additionalProperties":false}}},"required":["provisionId","provisionType","number","index","label","nodeId","state","pendingStatus","effectiveDate","contentHtml","annotations"],"additionalProperties":false}}},"required":["id","sourceType","contentKind","textFormat","instrument","edition","structureNodes","provisions"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}}},"required":["schemaVersion","source","warnings"],"additionalProperties":false}}}},"400":{"description":"Invalid JSON or parameters","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"401":{"description":"Invalid or missing Bearer key","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"Unapproved, suspended or expired access","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"409":{"description":"Idempotency key already accepted or reused with different input","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"413":{"description":"Body exceeds 2 MB","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"429":{"description":"Quota, rolling rate or AI concurrency limit exceeded","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"501":{"description":"Requested processing profile unavailable","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"504":{"description":"AI operation exceeded its time limit","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/interpretations/search":{"post":{"operationId":"interpretationSearch","summary":"Wyszukaj interpretacje podatkowe","tags":["Data"],"security":[{"Bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"1–128 characters [A-Za-z0-9._:-]. Scoped to API key and operation. A retry returns 409 and never re-executes; no response replay. The fingerprint uses normalized validated input.","schema":{"type":"string","maxLength":128}},{"name":"X-Processing-Profile","in":"header","required":false,"description":"Only standard is available. eea_zero_retention returns 501 before downstream execution.","schema":{"type":"string","enum":["standard","eea_zero_retention"],"default":"standard"}}],"description":"Cost: 1 request. Multiple search queries and full act retrieval still count as one request. Source-not-found and server failures release the reservation. A completed search with no matches or quote check with no match is billable.","x-usage-meter":"data","x-usage-units":1,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"queries":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","minLength":2,"maxLength":500}},"signature":{"type":"string","minLength":2,"maxLength":200},"dateFrom":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"dateTo":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"mode":{"type":"string","enum":["hybrid","semantic","lexical"]},"limit":{"type":"integer","minimum":1,"maximum":20}},"required":["queries"],"additionalProperties":false}}}},"responses":{"200":{"description":"Completed operation","headers":{"X-Request-Id":{"description":"Server request UUID","schema":{"type":"string"}},"X-Usage-Meter":{"description":"data or ai","schema":{"type":"string"}},"X-Usage-Units":{"description":"Counted requests (1 on success, 0 when refunded)","schema":{"type":"string"}},"X-Usage-Limit":{"description":"Limit for the active period","schema":{"type":"string"}},"X-Usage-Remaining":{"description":"Remaining quota at reservation time, including in-flight reservations","schema":{"type":"string"}},"X-Usage-Resets-At":{"description":"Current period end; renewal is approved by the operator","schema":{"type":"string"}},"X-Processing-Profile":{"description":"Effective backend processing profile","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"schemaVersion":{"type":"string","const":"1.0"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sourceType":{"type":"string","const":"interpretation"},"contentKind":{"type":"string","const":"source_with_ai_enrichment"},"documentId":{"type":"number"},"snapshotId":{"anyOf":[{"type":"number"},{"type":"null"}]},"signature":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"issueDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"taxTypes":{"type":"array","items":{"type":"string"}},"categoryLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"thesis":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"ordinal":{"type":"number"},"issue":{"type":"string"},"outcome":{"type":"string"},"quotes":{"type":"array","items":{"type":"string"}}},"required":["id","ordinal","issue","outcome","quotes"],"additionalProperties":false}}},"required":["id","sourceType","contentKind","documentId","signature","title","issueDate","taxTypes","categoryLabel","statusLabel","thesis","sourceUrl","questions"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["schemaVersion","items","warnings"],"additionalProperties":false}}}},"400":{"description":"Invalid JSON or parameters","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"401":{"description":"Invalid or missing Bearer key","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"Unapproved, suspended or expired access","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"409":{"description":"Idempotency key already accepted or reused with different input","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"413":{"description":"Body exceeds 2 MB","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"429":{"description":"Quota, rolling rate or AI concurrency limit exceeded","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"501":{"description":"Requested processing profile unavailable","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"504":{"description":"AI operation exceeded its time limit","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/interpretations/{id}":{"get":{"operationId":"interpretationGet","summary":"Pobierz tekst interpretacji podatkowej","tags":["Data"],"security":[{"Bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"1–128 characters [A-Za-z0-9._:-]. Scoped to API key and operation. A retry returns 409 and never re-executes; no response replay. The fingerprint uses normalized validated input.","schema":{"type":"string","maxLength":128}},{"name":"X-Processing-Profile","in":"header","required":false,"description":"Only standard is available. eea_zero_retention returns 501 before downstream execution.","schema":{"type":"string","enum":["standard","eea_zero_retention"],"default":"standard"}},{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991}}],"description":"Cost: 1 request. Multiple search queries and full act retrieval still count as one request. Source-not-found and server failures release the reservation. A completed search with no matches or quote check with no match is billable.","x-usage-meter":"data","x-usage-units":1,"responses":{"200":{"description":"Completed operation","headers":{"X-Request-Id":{"description":"Server request UUID","schema":{"type":"string"}},"X-Usage-Meter":{"description":"data or ai","schema":{"type":"string"}},"X-Usage-Units":{"description":"Counted requests (1 on success, 0 when refunded)","schema":{"type":"string"}},"X-Usage-Limit":{"description":"Limit for the active period","schema":{"type":"string"}},"X-Usage-Remaining":{"description":"Remaining quota at reservation time, including in-flight reservations","schema":{"type":"string"}},"X-Usage-Resets-At":{"description":"Current period end; renewal is approved by the operator","schema":{"type":"string"}},"X-Processing-Profile":{"description":"Effective backend processing profile","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"schemaVersion":{"type":"string","const":"1.0"},"source":{"type":"object","properties":{"id":{"type":"string"},"sourceType":{"type":"string","const":"interpretation"},"contentKind":{"type":"string","const":"source_with_ai_enrichment"},"documentId":{"type":"number"},"snapshotId":{"anyOf":[{"type":"number"},{"type":"null"}]},"signature":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"issueDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"taxTypes":{"type":"array","items":{"type":"string"}},"categoryLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"thesis":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"ordinal":{"type":"number"},"issue":{"type":"string"},"outcome":{"type":"string"},"quotes":{"type":"array","items":{"type":"string"}}},"required":["id","ordinal","issue","outcome","quotes"],"additionalProperties":false}},"textContentHtml":{"type":"string"},"textFormat":{"type":"string","const":"html"},"provisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"label":{"type":"string"},"groupLabel":{"type":"string"},"title":{"type":"string"},"editionId":{"type":"number"},"instrumentId":{"type":"number"}},"required":["id","label","groupLabel","title","editionId","instrumentId"],"additionalProperties":false}}},"required":["id","sourceType","contentKind","documentId","signature","title","issueDate","taxTypes","categoryLabel","statusLabel","thesis","sourceUrl","questions","textContentHtml","textFormat","provisions"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}}},"required":["schemaVersion","source","warnings"],"additionalProperties":false}}}},"400":{"description":"Invalid JSON or parameters","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"401":{"description":"Invalid or missing Bearer key","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"Unapproved, suspended or expired access","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"409":{"description":"Idempotency key already accepted or reused with different input","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"413":{"description":"Body exceeds 2 MB","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"429":{"description":"Quota, rolling rate or AI concurrency limit exceeded","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"501":{"description":"Requested processing profile unavailable","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"504":{"description":"AI operation exceeded its time limit","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/citations/verify":{"post":{"operationId":"citationVerify","summary":"Porównaj cytaty z tekstem źródła (bez modelu generatywnego)","tags":["Data"],"security":[{"Bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"1–128 characters [A-Za-z0-9._:-]. Scoped to API key and operation. A retry returns 409 and never re-executes; no response replay. The fingerprint uses normalized validated input.","schema":{"type":"string","maxLength":128}},{"name":"X-Processing-Profile","in":"header","required":false,"description":"Only standard is available. eea_zero_retention returns 501 before downstream execution.","schema":{"type":"string","enum":["standard","eea_zero_retention"],"default":"standard"}}],"description":"Cost: 1 request. Multiple search queries and full act retrieval still count as one request. Source-not-found and server failures release the reservation. A completed search with no matches or quote check with no match is billable.","x-usage-meter":"data","x-usage-units":1,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sourceId":{"type":"string","maxLength":200,"pattern":"^(provision|judgment):[1-9]\\d*$"},"quotes":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"quoteId":{"description":"Optional caller-provided correlation ID.","type":"string","minLength":1,"maxLength":200},"text":{"type":"string","minLength":1,"maxLength":10000,"description":"Purported verbatim quotation to verify."}},"required":["text"],"additionalProperties":false},"description":"One to twenty quotations from the same source."}},"required":["sourceId","quotes"],"additionalProperties":false}}}},"responses":{"200":{"description":"Completed operation","headers":{"X-Request-Id":{"description":"Server request UUID","schema":{"type":"string"}},"X-Usage-Meter":{"description":"data or ai","schema":{"type":"string"}},"X-Usage-Units":{"description":"Counted requests (1 on success, 0 when refunded)","schema":{"type":"string"}},"X-Usage-Limit":{"description":"Limit for the active period","schema":{"type":"string"}},"X-Usage-Remaining":{"description":"Remaining quota at reservation time, including in-flight reservations","schema":{"type":"string"}},"X-Usage-Resets-At":{"description":"Current period end; renewal is approved by the operator","schema":{"type":"string"}},"X-Processing-Profile":{"description":"Effective backend processing profile","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"schemaVersion":{"type":"string","const":"1.0"},"quotes":{"maxItems":20,"type":"array","items":{"oneOf":[{"type":"object","properties":{"quoteId":{"type":"string","minLength":1,"maxLength":200},"requestedQuote":{"type":"string","minLength":1,"maxLength":10000},"status":{"type":"string","const":"exact"},"canonicalQuote":{"type":"string","minLength":1,"maxLength":10000},"similarity":{"type":"number","const":1},"locator":{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":9007199254740991},"end":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["start","end"],"additionalProperties":false}},"required":["requestedQuote","status","canonicalQuote","similarity","locator"],"additionalProperties":false},{"type":"object","properties":{"quoteId":{"type":"string","minLength":1,"maxLength":200},"requestedQuote":{"type":"string","minLength":1,"maxLength":10000},"status":{"type":"string","const":"corrected"},"canonicalQuote":{"type":"string","minLength":1,"maxLength":10000},"similarity":{"type":"number","minimum":0,"maximum":1},"locator":{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":9007199254740991},"end":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["start","end"],"additionalProperties":false}},"required":["requestedQuote","status","canonicalQuote","similarity","locator"],"additionalProperties":false},{"type":"object","properties":{"quoteId":{"type":"string","minLength":1,"maxLength":200},"requestedQuote":{"type":"string","minLength":1,"maxLength":10000},"status":{"type":"string","const":"not_found"},"similarity":{"type":"number","minimum":0,"maximum":1},"locator":{"type":"null"}},"required":["requestedQuote","status","similarity","locator"],"additionalProperties":false}]}},"appliedFilters":{"type":"object","properties":{"sourceId":{"type":"string","minLength":1,"maxLength":200}},"required":["sourceId"],"additionalProperties":false},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":1000}},"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED","LIMIT_REACHED","INVALID_FILTER","SOURCE_NOT_FOUND","QUOTE_NOT_FOUND","INTERNAL_ERROR"]},"message":{"type":"string","minLength":1,"maxLength":1000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","quotes","appliedFilters","warnings"],"additionalProperties":false}}}},"400":{"description":"Invalid JSON or parameters","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"401":{"description":"Invalid or missing Bearer key","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"Unapproved, suspended or expired access","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"409":{"description":"Idempotency key already accepted or reused with different input","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"413":{"description":"Body exceeds 2 MB","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"429":{"description":"Quota, rolling rate or AI concurrency limit exceeded","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"501":{"description":"Requested processing profile unavailable","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"504":{"description":"AI operation exceeded its time limit","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/ai/quotes/extract":{"post":{"operationId":"quoteExtract","summary":"Wybierz cytaty z pomocą AI i zweryfikuj dosłowność","tags":["AI"],"security":[{"Bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"1–128 characters [A-Za-z0-9._:-]. Scoped to API key and operation. A retry returns 409 and never re-executes; no response replay. The fingerprint uses normalized validated input.","schema":{"type":"string","maxLength":128}},{"name":"X-Processing-Profile","in":"header","required":false,"description":"Only standard is available. eea_zero_retention returns 501 before downstream execution.","schema":{"type":"string","enum":["standard","eea_zero_retention"],"default":"standard"}}],"description":"Cost: 1 AI analysis. Multiple search queries and full act retrieval still count as one request. Source-not-found and server failures release the reservation. A completed search with no matches or quote check with no match is billable.","x-usage-meter":"ai","x-usage-units":1,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sourceId":{"type":"string","maxLength":200,"pattern":"^(provision|judgment):[1-9]\\d*$"},"query":{"type":"string","minLength":2,"maxLength":500,"description":"What legal point the requested quotations should address."},"maxQuotes":{"description":"Maximum quotations to return, from 1 to 10.","type":"integer","minimum":1,"maximum":10}},"required":["sourceId","query"],"additionalProperties":false}}}},"responses":{"200":{"description":"Completed operation","headers":{"X-Request-Id":{"description":"Server request UUID","schema":{"type":"string"}},"X-Usage-Meter":{"description":"data or ai","schema":{"type":"string"}},"X-Usage-Units":{"description":"Counted requests (1 on success, 0 when refunded)","schema":{"type":"string"}},"X-Usage-Limit":{"description":"Limit for the active period","schema":{"type":"string"}},"X-Usage-Remaining":{"description":"Remaining quota at reservation time, including in-flight reservations","schema":{"type":"string"}},"X-Usage-Resets-At":{"description":"Current period end; renewal is approved by the operator","schema":{"type":"string"}},"X-Processing-Profile":{"description":"Effective backend processing profile","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"schemaVersion":{"type":"string","const":"1.0"},"quotes":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":500},"sourceId":{"type":"string","minLength":1,"maxLength":200},"text":{"type":"string","minLength":1,"maxLength":10000},"similarity":{"type":"number","const":1},"locator":{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":9007199254740991},"end":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["start","end"],"additionalProperties":false}},"required":["id","sourceId","text","similarity","locator"],"additionalProperties":false}},"appliedFilters":{"type":"object","properties":{"sourceId":{"type":"string","minLength":1,"maxLength":200},"maxQuotes":{"type":"integer","minimum":1,"maximum":10}},"required":["sourceId","maxQuotes"],"additionalProperties":false},"warnings":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":1000}},"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED","LIMIT_REACHED","INVALID_FILTER","SOURCE_NOT_FOUND","QUOTE_NOT_FOUND","INTERNAL_ERROR"]},"message":{"type":"string","minLength":1,"maxLength":1000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["schemaVersion","quotes","appliedFilters","warnings"],"additionalProperties":false}}}},"400":{"description":"Invalid JSON or parameters","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"401":{"description":"Invalid or missing Bearer key","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"Unapproved, suspended or expired access","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"409":{"description":"Idempotency key already accepted or reused with different input","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"413":{"description":"Body exceeds 2 MB","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"429":{"description":"Quota, rolling rate or AI concurrency limit exceeded","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"501":{"description":"Requested processing profile unavailable","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"504":{"description":"AI operation exceeded its time limit","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/ai/analysis":{"post":{"tags":["AI"],"summary":"Analyze legal question","description":"1 AI analysis. Internal retrieval is included; no additional ordinary requests. Maximum 240 seconds. The answer is text, not schema-validated JSON. History is trimmed to its last 8 messages; additional_context is trimmed to 10,000 characters. Request text, sources, generated documents and operational metadata may be persisted by the application. Streaming failures after HTTP 200 appear as error and finish events. Execution failures release uncommitted reservations. On acknowledgement failure inspect finish.usage.reservationStatus and /usage; a confirmed charge is never refunded twice.","security":[{"Bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"question":{"type":"string","minLength":1,"maxLength":10000},"settings":{"type":"object","properties":{"messages":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":10000}},"required":["role","content"]}},"additional_context":{"type":"string","maxLength":50000},"response_format":{"type":"string","enum":["text","chat"]},"output_format_prompt":{"type":"string","maxLength":2000}},"additionalProperties":false}},"required":["question"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful analysis response","content":{"application/json":{"schema":{"type":"object","properties":{"response":{"type":"string","description":"The AI-generated legal analysis response"},"sources":{"type":"array","description":"List of sources used in the response","items":{"type":"object","properties":{"type":{"type":"string","enum":["judgment","provision","act","eu_act","interpretation","document","attachment"]},"id":{"type":"integer","description":"Local source reference in the answer"},"fields":{"type":"object"}}}},"finishReason":{"type":"string","example":"stop"},"presentation":{"type":"object","description":"Only returned when settings.response_format=chat.","properties":{"version":{"type":"integer","const":1},"citations":{"type":["object","null"],"description":"Quote verification (quotes), canonical corrections (correctedQuotes), sourceRefs and unknownRefs used by the chat renderer."}}}}}}},"headers":{"X-Request-Id":{"description":"Server request UUID","schema":{"type":"string"}},"X-Usage-Meter":{"description":"data or ai","schema":{"type":"string"}},"X-Usage-Units":{"description":"Counted requests (1 on success, 0 when refunded)","schema":{"type":"string"}},"X-Usage-Limit":{"description":"Limit for the active period","schema":{"type":"string"}},"X-Usage-Remaining":{"description":"Remaining quota at reservation time, including in-flight reservations","schema":{"type":"string"}},"X-Usage-Resets-At":{"description":"Current period end; renewal is approved by the operator","schema":{"type":"string"}},"X-Processing-Profile":{"description":"Effective backend processing profile","schema":{"type":"string"}}}},"400":{"description":"Invalid JSON or parameters","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"401":{"description":"Invalid or missing Bearer key","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"Unapproved, suspended or expired access","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"409":{"description":"Idempotency key already accepted or reused with different input","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"413":{"description":"Body exceeds 2 MB","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"429":{"description":"Quota, rolling rate or AI concurrency limit exceeded","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"501":{"description":"Requested processing profile unavailable","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"504":{"description":"AI operation exceeded its time limit","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"1–128 characters [A-Za-z0-9._:-]. Scoped to API key and operation. A retry returns 409 and never re-executes; no response replay. The fingerprint uses normalized validated input.","schema":{"type":"string","maxLength":128}},{"name":"X-Processing-Profile","in":"header","required":false,"description":"Only standard is available. eea_zero_retention returns 501 before downstream execution.","schema":{"type":"string","enum":["standard","eea_zero_retention"],"default":"standard"}}],"x-usage-meter":"ai","x-usage-units":1}},"/api/v1/ai/analysis/stream":{"post":{"tags":["AI"],"summary":"Analyze legal question (streaming)","description":"1 AI analysis. Internal retrieval is included; no additional ordinary requests. Maximum 240 seconds. The answer is text, not schema-validated JSON. History is trimmed to its last 8 messages; additional_context is trimmed to 10,000 characters. Request text, sources, generated documents and operational metadata may be persisted by the application. Streaming failures after HTTP 200 appear as error and finish events. Execution failures release uncommitted reservations. On acknowledgement failure inspect finish.usage.reservationStatus and /usage; a confirmed charge is never refunded twice.","security":[{"Bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"question":{"type":"string","minLength":1,"maxLength":10000},"settings":{"type":"object","properties":{"messages":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":10000}},"required":["role","content"]}},"additional_context":{"type":"string","maxLength":50000},"response_format":{"type":"string","enum":["text","chat"]},"output_format_prompt":{"type":"string","maxLength":2000}},"additionalProperties":false}},"required":["question"],"additionalProperties":false}}}},"responses":{"200":{"description":"Streaming NDJSON response","content":{"application/x-ndjson":{"schema":{"type":"string","description":"One JSON object per line. Default text format: text-delta, error, finish. With settings.response_format=chat: ui events with public part payloads (step-start, text-start/delta/end, data-agent-activity, data-research-event, data-turn-narration, data-final-answer-start, data-research-complete, data-citations), error, finish. The finish event contains canonical response, sources, finishReason, usage.meter, usage.units and request_id, plus presentation with citation verification when chat is requested."},"example":"{\"type\":\"text-delta\",\"textDelta\":\"Odpowiedź…\"}\n{\"type\":\"finish\",\"response\":\"Odpowiedź…\",\"sources\":[],\"finishReason\":\"stop\",\"usage\":{\"meter\":\"ai\",\"units\":1},\"request_id\":\"00000000-0000-4000-8000-000000000001\"}\n"}},"headers":{"X-Request-Id":{"description":"Server request UUID","schema":{"type":"string"}},"X-Usage-Meter":{"description":"data or ai","schema":{"type":"string"}},"X-Usage-Units":{"description":"Counted requests (1 on success, 0 when refunded)","schema":{"type":"string"}},"X-Usage-Limit":{"description":"Limit for the active period","schema":{"type":"string"}},"X-Usage-Remaining":{"description":"Remaining quota at reservation time, including in-flight reservations","schema":{"type":"string"}},"X-Usage-Resets-At":{"description":"Current period end; renewal is approved by the operator","schema":{"type":"string"}},"X-Processing-Profile":{"description":"Effective backend processing profile","schema":{"type":"string"}}}},"400":{"description":"Invalid JSON or parameters","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"401":{"description":"Invalid or missing Bearer key","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"Unapproved, suspended or expired access","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"409":{"description":"Idempotency key already accepted or reused with different input","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"413":{"description":"Body exceeds 2 MB","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"429":{"description":"Quota, rolling rate or AI concurrency limit exceeded","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"501":{"description":"Requested processing profile unavailable","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"504":{"description":"AI operation exceeded its time limit","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"1–128 characters [A-Za-z0-9._:-]. Scoped to API key and operation. A retry returns 409 and never re-executes; no response replay. The fingerprint uses normalized validated input.","schema":{"type":"string","maxLength":128}},{"name":"X-Processing-Profile","in":"header","required":false,"description":"Only standard is available. eea_zero_retention returns 501 before downstream execution.","schema":{"type":"string","enum":["standard","eea_zero_retention"],"default":"standard"}}],"x-usage-meter":"ai","x-usage-units":1}},"/api/v1/usage":{"get":{"operationId":"usage","tags":["Account"],"summary":"Current quotas and usage","description":"1 ordinary request. Counts towards the request rate limit. Requires approved access and an active period.","x-usage-meter":"data","x-usage-units":1,"security":[{"Bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"1–128 characters [A-Za-z0-9._:-]. Scoped to API key and operation. A retry returns 409 and never re-executes; no response replay. The fingerprint uses normalized validated input.","schema":{"type":"string","maxLength":128}},{"name":"X-Processing-Profile","in":"header","required":false,"description":"Only standard is available. eea_zero_retention returns 501 before downstream execution.","schema":{"type":"string","enum":["standard","eea_zero_retention"],"default":"standard"}}],"responses":{"200":{"description":"Account metadata","headers":{"X-Request-Id":{"description":"Server request UUID","schema":{"type":"string"}},"X-Usage-Meter":{"description":"data or ai","schema":{"type":"string"}},"X-Usage-Units":{"description":"Counted requests (1 on success, 0 when refunded)","schema":{"type":"string"}},"X-Usage-Limit":{"description":"Limit for the active period","schema":{"type":"string"}},"X-Usage-Remaining":{"description":"Remaining quota at reservation time, including in-flight reservations","schema":{"type":"string"}},"X-Usage-Resets-At":{"description":"Current period end; renewal is approved by the operator","schema":{"type":"string"}},"X-Processing-Profile":{"description":"Effective backend processing profile","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"plan":{"type":"string"},"status":{"type":"string"},"processingProfile":{"type":"string"},"period":{"type":"object","properties":{"startsAt":{"type":"string"},"endsAt":{"type":"string"}},"required":["startsAt","endsAt"],"additionalProperties":false},"data":{"type":"object","properties":{"limit":{"type":"number"},"used":{"type":"number"},"remaining":{"type":"number"}},"required":["limit","used","remaining"],"additionalProperties":false},"ai":{"type":"object","properties":{"limit":{"type":"number"},"used":{"type":"number"},"remaining":{"type":"number"}},"required":["limit","used","remaining"],"additionalProperties":false},"requestsPerMinute":{"type":"number"},"concurrentAi":{"type":"number"}},"required":["plan","status","processingProfile","period","data","ai","requestsPerMinute","concurrentAi"],"additionalProperties":false}}}},"400":{"description":"Invalid JSON or parameters","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"401":{"description":"Invalid or missing Bearer key","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"Unapproved, suspended or expired access","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"409":{"description":"Idempotency key already accepted or reused with different input","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"413":{"description":"Body exceeds 2 MB","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"429":{"description":"Quota, rolling rate or AI concurrency limit exceeded","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"501":{"description":"Requested processing profile unavailable","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"504":{"description":"AI operation exceeded its time limit","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/capabilities":{"get":{"operationId":"capabilities","tags":["Account"],"summary":"Supported capabilities and limitations","description":"1 ordinary request. Counts towards the request rate limit. Requires approved access and an active period.","x-usage-meter":"data","x-usage-units":1,"security":[{"Bearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"1–128 characters [A-Za-z0-9._:-]. Scoped to API key and operation. A retry returns 409 and never re-executes; no response replay. The fingerprint uses normalized validated input.","schema":{"type":"string","maxLength":128}},{"name":"X-Processing-Profile","in":"header","required":false,"description":"Only standard is available. eea_zero_retention returns 501 before downstream execution.","schema":{"type":"string","enum":["standard","eea_zero_retention"],"default":"standard"}}],"responses":{"200":{"description":"Account metadata","headers":{"X-Request-Id":{"description":"Server request UUID","schema":{"type":"string"}},"X-Usage-Meter":{"description":"data or ai","schema":{"type":"string"}},"X-Usage-Units":{"description":"Counted requests (1 on success, 0 when refunded)","schema":{"type":"string"}},"X-Usage-Limit":{"description":"Limit for the active period","schema":{"type":"string"}},"X-Usage-Remaining":{"description":"Remaining quota at reservation time, including in-flight reservations","schema":{"type":"string"}},"X-Usage-Resets-At":{"description":"Current period end; renewal is approved by the operator","schema":{"type":"string"}},"X-Processing-Profile":{"description":"Effective backend processing profile","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"string"},"sourceTypes":{"type":"array","items":{"type":"string"}},"searchModes":{"type":"array","items":{"type":"string"}},"maxSearchResults":{"type":"integer"},"quoteSourceTypes":{"type":"array","items":{"type":"string"}},"processingProfiles":{"type":"object"},"operations":{"type":"object"},"limitations":{"type":"array","items":{"type":"string"}}}}}}},"400":{"description":"Invalid JSON or parameters","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"401":{"description":"Invalid or missing Bearer key","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"Unapproved, suspended or expired access","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"409":{"description":"Idempotency key already accepted or reused with different input","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"413":{"description":"Body exceeds 2 MB","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"429":{"description":"Quota, rolling rate or AI concurrency limit exceeded","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"501":{"description":"Requested processing profile unavailable","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"504":{"description":"AI operation exceeded its time limit","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/widget/sessions":{"post":{"operationId":"widgetSession","tags":["Widget"],"summary":"Create a short-lived widget session","security":[{"Bearer":[]}],"description":"Server-to-server: use the private company API key. No usage charge. Requires active API access and remaining AI analyses. Token expires in 15 minutes and is scoped exclusively to widget chat, transcription and original source previews. For authenticated mode, subject must come from the company's verified server session. HTTPS origin only, except localhost development. Set purpose=chat for a single-question credential, source for read-only access or voice for transcription. A repeated grantId cannot run another analysis, even after token refresh; the API enforces this through its durable idempotency ledger.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["origin","mode"],"properties":{"purpose":{"type":"string","enum":["chat","source","voice"],"description":"Recommended. Omission preserves legacy session scope."},"grantId":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z0-9._:-]+$","description":"Optional server-issued question allowance ID; only with purpose=chat. Keep stable across retries. A random grant is assigned when omitted."},"origin":{"type":"string","maxLength":300,"example":"https://app.example.com"},"mode":{"type":"string","enum":["public","authenticated"]},"subject":{"type":"string","minLength":1,"maxLength":200,"description":"Required in authenticated mode; never accept an unverified browser-supplied user ID."}}}}}},"responses":{"200":{"description":"Scoped widget session","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"parentOrigin":{"type":"string"},"identity":{"type":"string","description":"Stable pseudonymous identity used to reset the UI when the user changes."}}}}}},"400":{"description":"Invalid JSON or parameters","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"401":{"description":"Invalid or missing Bearer key","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"Unapproved, suspended or expired access","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"409":{"description":"Idempotency key already accepted or reused with different input","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"413":{"description":"Body exceeds 2 MB","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"429":{"description":"Quota, rolling rate or AI concurrency limit exceeded","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"501":{"description":"Requested processing profile unavailable","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"504":{"description":"AI operation exceeded its time limit","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/widget/chat":{"post":{"operationId":"widgetChat","tags":["Widget"],"summary":"Stream a legal chat answer","security":[{"WidgetSession":[]}],"description":"1 AI analysis. Up to 8 previous messages, each up to 10,000 characters. No attachments or document tools. No transcript archive; temporary source workspaces are deleted after execution. NDJSON finish contains the canonical answer and sources. Failed/aborted operations release uncommitted reservations. No automatic replay after connection loss.","x-usage-meter":"ai","x-usage-units":1,"parameters":[{"name":"X-Widget-Parent-Origin","in":"header","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":90},"description":"Legacy credentials scope this key to the session. purpose=chat uses its server-issued one-shot grant regardless of this header."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["question"],"properties":{"response_format":{"type":"string","enum":["text","chat"],"default":"text","description":"chat emits public UI parts and final citation verification for the shared chat renderer."},"question":{"type":"string","minLength":1,"maxLength":10000},"messages":{"type":"array","maxItems":8,"items":{"type":"object","additionalProperties":false,"required":["role","content"],"properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":10000}}}}}}}}},"responses":{"200":{"description":"NDJSON: default status, text-delta, error, finish. With response_format=chat: ui (public part), error, finish with presentation.version=1 and presentation.citations. Check finishReason; HTTP 200 alone does not imply success.","headers":{"X-Request-Id":{"description":"Server request UUID","schema":{"type":"string"}},"X-Usage-Meter":{"description":"data or ai","schema":{"type":"string"}},"X-Usage-Units":{"description":"Counted requests (1 on success, 0 when refunded)","schema":{"type":"string"}},"X-Usage-Limit":{"description":"Limit for the active period","schema":{"type":"string"}},"X-Usage-Remaining":{"description":"Remaining quota at reservation time, including in-flight reservations","schema":{"type":"string"}},"X-Usage-Resets-At":{"description":"Current period end; renewal is approved by the operator","schema":{"type":"string"}},"X-Processing-Profile":{"description":"Effective backend processing profile","schema":{"type":"string"}}},"content":{"application/x-ndjson":{"schema":{"type":"string"}}}},"400":{"description":"Invalid JSON or parameters","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"401":{"description":"Invalid or missing Bearer key","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"Unapproved, suspended or expired access","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"409":{"description":"Idempotency key already accepted or reused with different input","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"413":{"description":"Body exceeds 2 MB","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"429":{"description":"Quota, rolling rate or AI concurrency limit exceeded","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"501":{"description":"Requested processing profile unavailable","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"504":{"description":"AI operation exceeded its time limit","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/widget/sources/{type}/{id}":{"get":{"operationId":"widgetOriginalSource","tags":["Widget"],"summary":"Read the complete original judgment or tax interpretation","security":[{"WidgetSession":[]}],"description":"1 ordinary request, using judgmentGet or interpretationGet. No AI summaries. Missing originals return 404 and refund the reservation. Source IDs come from fields.external_id, not local citation references.","x-usage-meter":"data","x-usage-units":1,"parameters":[{"name":"X-Widget-Parent-Origin","in":"header","required":true,"schema":{"type":"string"}},{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["judgment","interpretation"]}},{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":false,"description":"1–128 characters [A-Za-z0-9._:-]. Scoped to API key and operation. A retry returns 409 and never re-executes; no response replay. The fingerprint uses normalized validated input.","schema":{"type":"string","maxLength":128}},{"name":"X-Processing-Profile","in":"header","required":false,"description":"Only standard is available. eea_zero_retention returns 501 before downstream execution.","schema":{"type":"string","enum":["standard","eea_zero_retention"],"default":"standard"}}],"responses":{"200":{"description":"Full original document. Render source HTML safely.","headers":{"X-Request-Id":{"description":"Server request UUID","schema":{"type":"string"}},"X-Usage-Meter":{"description":"data or ai","schema":{"type":"string"}},"X-Usage-Units":{"description":"Counted requests (1 on success, 0 when refunded)","schema":{"type":"string"}},"X-Usage-Limit":{"description":"Limit for the active period","schema":{"type":"string"}},"X-Usage-Remaining":{"description":"Remaining quota at reservation time, including in-flight reservations","schema":{"type":"string"}},"X-Usage-Resets-At":{"description":"Current period end; renewal is approved by the operator","schema":{"type":"string"}},"X-Processing-Profile":{"description":"Effective backend processing profile","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"integer"},"contentKind":{"const":"verbatim"},"textContentHtml":{"type":"string"},"fields":{"type":"object"}}}}}},"400":{"description":"Invalid JSON or parameters","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"401":{"description":"Invalid or missing Bearer key","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"Unapproved, suspended or expired access","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"409":{"description":"Idempotency key already accepted or reused with different input","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"413":{"description":"Body exceeds 2 MB","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"429":{"description":"Quota, rolling rate or AI concurrency limit exceeded","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"501":{"description":"Requested processing profile unavailable","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"504":{"description":"AI operation exceeded its time limit","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}},"/api/v1/widget/transcribe":{"post":{"operationId":"widgetTranscribe","tags":["Widget"],"summary":"Transcribe a dictated question","security":[{"WidgetSession":[]}],"description":"1 ordinary request on success. Raw audio, maximum 5 MB; timeout 60 seconds. Audio and transcription are not persisted by the endpoint. Requires an active widget session, approved API account and standard processing profile. Failed operations release uncommitted reservations.","x-usage-meter":"data","x-usage-units":1,"parameters":[{"name":"X-Widget-Parent-Origin","in":"header","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"1–128 characters [A-Za-z0-9._:-]. Scoped to API key and operation. A retry returns 409 and never re-executes; no response replay. The fingerprint uses normalized validated input.","schema":{"type":"string","maxLength":128}},{"name":"X-Processing-Profile","in":"header","required":false,"description":"Only standard is available. eea_zero_retention returns 501 before downstream execution.","schema":{"type":"string","enum":["standard","eea_zero_retention"],"default":"standard"}}],"requestBody":{"required":true,"content":{"audio/webm":{"schema":{"type":"string","format":"binary"}},"audio/mp4":{"schema":{"type":"string","format":"binary"}},"audio/ogg":{"schema":{"type":"string","format":"binary"}},"audio/wav":{"schema":{"type":"string","format":"binary"}},"audio/mpeg":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Recognized Polish speech","headers":{"X-Request-Id":{"description":"Server request UUID","schema":{"type":"string"}},"X-Usage-Meter":{"description":"data or ai","schema":{"type":"string"}},"X-Usage-Units":{"description":"Counted requests (1 on success, 0 when refunded)","schema":{"type":"string"}},"X-Usage-Limit":{"description":"Limit for the active period","schema":{"type":"string"}},"X-Usage-Remaining":{"description":"Remaining quota at reservation time, including in-flight reservations","schema":{"type":"string"}},"X-Usage-Resets-At":{"description":"Current period end; renewal is approved by the operator","schema":{"type":"string"}},"X-Processing-Profile":{"description":"Effective backend processing profile","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string"}}}}}},"400":{"description":"Invalid JSON or parameters","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"401":{"description":"Invalid or missing Bearer key","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"403":{"description":"Unapproved, suspended or expired access","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"404":{"description":"Source not found","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"409":{"description":"Idempotency key already accepted or reused with different input","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"413":{"description":"Body exceeds 2 MB","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"429":{"description":"Quota, rolling rate or AI concurrency limit exceeded","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"501":{"description":"Requested processing profile unavailable","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}},"504":{"description":"AI operation exceeded its time limit","content":{"application/json":{"schema":{"type":"object","required":["message","error_code"],"properties":{"message":{"type":"string"},"error_code":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"link":{"type":"string","format":"uri"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}}}}