{"openapi":"3.1.0","info":{"title":"MaBrain","description":"A brain for your agent: facts with sources and certainty, and the gaps it does not cover.","version":"0.153.0"},"paths":{"/status":{"get":{"summary":"Status","description":"Version and whether the knowledge engine answers (E2-4).","operationId":"status_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Status Status Get"}}}}}}},"/v1/pricing":{"get":{"tags":["agents"],"summary":"Pricing","description":"MaBrain's prices (public, no key): the rate in dollars per million tokens, the cost model the\ncrawler's preview estimates with (tokens per character of visible text plus a fixed number of tokens\nper document; each page is one document), and each plan's limits (``plans``). The top-level\n``monthly_usd`` and ``queries_*`` are the free plan's, as before plans existed.","operationId":"pricing_v1_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Pricing V1 Pricing Get"}}}}}}},"/v1/tools":{"get":{"tags":["agents"],"summary":"Tools","description":"Tool definitions for your agent's function calling, one per verb (public, no key). With\n``role``, only the tools a key of that role may call.","operationId":"tools_v1_tools_get","parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(anthropic|openai|routes)$","default":"anthropic","title":"Format"}},{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(read|ingest|curate)$"},{"type":"null"}],"title":"Role"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brains":{"get":{"summary":"List Brains","operationId":"list_brains_v1_brains_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Brains V1 Brains Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brains/{brain}":{"get":{"summary":"Get Brain","operationId":"get_brain_v1_brains__brain__get","parameters":[{"name":"brain","in":"path","required":true,"schema":{"type":"string","title":"Brain"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Brain V1 Brains  Brain  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brains/{brain}/facts/{fact_id}":{"get":{"summary":"Get Fact","operationId":"get_fact_v1_brains__brain__facts__fact_id__get","parameters":[{"name":"brain","in":"path","required":true,"schema":{"type":"string","title":"Brain"}},{"name":"fact_id","in":"path","required":true,"schema":{"type":"string","title":"Fact Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Fact V1 Brains  Brain  Facts  Fact Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Fact","operationId":"delete_fact_v1_brains__brain__facts__fact_id__delete","parameters":[{"name":"brain","in":"path","required":true,"schema":{"type":"string","title":"Brain"}},{"name":"fact_id","in":"path","required":true,"schema":{"type":"string","title":"Fact Id"}},{"name":"reason","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Reason"}},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force"}},{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DeleteBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brains/{brain}/ask":{"post":{"summary":"Ask","description":"Facts with source and certainty and a ``context`` ready for your model's prompt. Nothing is\njudged and no gap is recorded: your model decides from the facts (``/search`` only, Seb 13/10).","operationId":"ask_v1_brains__brain__ask_post","parameters":[{"name":"brain","in":"path","required":true,"schema":{"type":"string","title":"Brain"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ask V1 Brains  Brain  Ask Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brains/{brain}/evaluate":{"post":{"summary":"Evaluate","description":"Which of these questions the brain covers (it records no gaps).","operationId":"evaluate_v1_brains__brain__evaluate_post","parameters":[{"name":"brain","in":"path","required":true,"schema":{"type":"string","title":"Brain"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluateBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Evaluate V1 Brains  Brain  Evaluate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brains/{brain}/sources":{"post":{"summary":"Add Source","description":"Upload a text file (Markdown, plain text or HTML; up to 50 MB) and extract it into the brain.\nA PDF or Word file is refused (415 text_only): convert it on your side and send the text.\n``source_url`` is only the page it came from, for the receipts: this server never\ndownloads URLs (the crawler runs on your machine). ``source_type``: a key of the brain's kinds of\nsource, the kind of this document (not of what it cites); without it MaBrain files the source by its name\nalone, and the answer says which. ``document_date``: the document's own date (minutes, a contract, a law) as\nYYYY-MM-DD, what ``ask`` compares as the more recent document; leave it out when it has none.","operationId":"add_source_v1_brains__brain__sources_post","parameters":[{"name":"brain","in":"path","required":true,"schema":{"type":"string","title":"Brain"}},{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_add_source_v1_brains__brain__sources_post"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Sources","description":"The brain's sources in its order of sources, with their facts counted by level (docs/fuentes-api.md).","operationId":"list_sources_v1_brains__brain__sources_get","parameters":[{"name":"brain","in":"path","required":true,"schema":{"type":"string","title":"Brain"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Type"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Sources V1 Brains  Brain  Sources Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brains/{brain}/jobs/{job_id}":{"get":{"summary":"Get Job","operationId":"get_job_v1_brains__brain__jobs__job_id__get","parameters":[{"name":"brain","in":"path","required":true,"schema":{"type":"string","title":"Brain"}},{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Job V1 Brains  Brain  Jobs  Job Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brains/{brain}/gaps":{"get":{"summary":"List Gaps","operationId":"list_gaps_v1_brains__brain__gaps_get","parameters":[{"name":"brain","in":"path","required":true,"schema":{"type":"string","title":"Brain"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Gaps V1 Brains  Brain  Gaps Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brains/{brain}/sources/{document_id}":{"get":{"summary":"Get Source","description":"One source: its facts (a page), each with its passage and where it is in the text, and a five-minute link to\nthe text (docs/fuentes-api.md).","operationId":"get_source_v1_brains__brain__sources__document_id__get","parameters":[{"name":"brain","in":"path","required":true,"schema":{"type":"string","title":"Brain"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"level","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Level"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Source V1 Brains  Brain  Sources  Document Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brains/{brain}/sources/{document_id}/text":{"get":{"summary":"Source Text","description":"The source's Markdown, for the five minutes of a link the detail made: the link is the credential (a bearer\nlink, kept out of the access log by ``access_log``), checked before anything is read; the brain's pot must still\nhave facts from it.","operationId":"source_text_v1_brains__brain__sources__document_id__text_get","parameters":[{"name":"brain","in":"path","required":true,"schema":{"type":"string","title":"Brain"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"exp","in":"query","required":false,"schema":{"type":"string","maxLength":12,"default":"","title":"Exp"}},{"name":"sig","in":"query","required":false,"schema":{"type":"string","maxLength":128,"default":"","title":"Sig"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brains/{brain}/knowledge":{"post":{"summary":"Add Knowledge","operationId":"add_knowledge_v1_brains__brain__knowledge_post","parameters":[{"name":"brain","in":"path","required":true,"schema":{"type":"string","title":"Brain"}},{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brains/{brain}/review":{"get":{"summary":"Review Queue","operationId":"review_queue_v1_brains__brain__review_get","parameters":[{"name":"brain","in":"path","required":true,"schema":{"type":"string","title":"Brain"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Review Queue V1 Brains  Brain  Review Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brains/{brain}/facts/{fact_id}/approve":{"post":{"summary":"Approve","operationId":"approve_v1_brains__brain__facts__fact_id__approve_post","parameters":[{"name":"brain","in":"path","required":true,"schema":{"type":"string","title":"Brain"}},{"name":"fact_id","in":"path","required":true,"schema":{"type":"string","title":"Fact Id"}},{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brains/{brain}/facts/{fact_id}/reject":{"post":{"summary":"Reject","operationId":"reject_v1_brains__brain__facts__fact_id__reject_post","parameters":[{"name":"brain","in":"path","required":true,"schema":{"type":"string","title":"Brain"}},{"name":"fact_id","in":"path","required":true,"schema":{"type":"string","title":"Fact Id"}},{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brains/{brain}/facts/{fact_id}/curations/{curation_id}":{"delete":{"summary":"Revoke","operationId":"revoke_v1_brains__brain__facts__fact_id__curations__curation_id__delete","parameters":[{"name":"brain","in":"path","required":true,"schema":{"type":"string","title":"Brain"}},{"name":"fact_id","in":"path","required":true,"schema":{"type":"string","title":"Fact Id"}},{"name":"curation_id","in":"path","required":true,"schema":{"type":"string","title":"Curation Id"}},{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brains/{brain}/gaps/{gap_id}/answer":{"post":{"summary":"Answer Gap","operationId":"answer_gap_v1_brains__brain__gaps__gap_id__answer_post","parameters":[{"name":"brain","in":"path","required":true,"schema":{"type":"string","title":"Brain"}},{"name":"gap_id","in":"path","required":true,"schema":{"type":"string","title":"Gap Id"}},{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brains/{brain}/gaps/{gap_id}/confirm":{"post":{"summary":"Confirm Gap","description":"Close a gap answered in full by someone with only ingest (Add): only curate (Manage) confirms it.","operationId":"confirm_gap_v1_brains__brain__gaps__gap_id__confirm_post","parameters":[{"name":"brain","in":"path","required":true,"schema":{"type":"string","title":"Brain"}},{"name":"gap_id","in":"path","required":true,"schema":{"type":"string","title":"Gap Id"}},{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brains/{brain}/gaps/{gap_id}/dismiss":{"post":{"summary":"Dismiss Gap","operationId":"dismiss_gap_v1_brains__brain__gaps__gap_id__dismiss_post","parameters":[{"name":"brain","in":"path","required":true,"schema":{"type":"string","title":"Brain"}},{"name":"gap_id","in":"path","required":true,"schema":{"type":"string","title":"Gap Id"}},{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DismissBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/brains/{brain}/gaps/{gap_id}":{"delete":{"summary":"Delete Gap","description":"Delete a gap for good, its question's text included (Seba, 23/10). Any role reaches it for its own unanswered\nquestion; anything else needs «Gestionar» (``curation.delete_gap``).","operationId":"delete_gap_v1_brains__brain__gaps__gap_id__delete","parameters":[{"name":"brain","in":"path","required":true,"schema":{"type":"string","title":"Brain"}},{"name":"gap_id","in":"path","required":true,"schema":{"type":"string","title":"Gap Id"}},{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys":{"post":{"summary":"Create Key","description":"A key for one of your apps (signed-in person only; roles your sign-in holds). The key is in\nthis answer only: store it in the app's secrets right away.\n\nWith ``Idempotency-Key``, the key and the record of this operation are written in one\ntransaction, so a retry always finds what happened: a replay returns the same\n``credential_id`` with ``key: null`` (shown once, never stored), to revoke it and create another.","operationId":"create_key_v1_keys_post","parameters":[{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Keys","description":"Your apps' keys (never the keys themselves); with ``brain``, the ones that open it (in a brain\nshared with you, the ones you made).","operationId":"list_keys_v1_keys_get","parameters":[{"name":"brain","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Brain"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Keys V1 Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/{credential_id}":{"delete":{"summary":"Revoke Key","operationId":"revoke_key_v1_keys__credential_id__delete","parameters":[{"name":"credential_id","in":"path","required":true,"schema":{"type":"string","title":"Credential Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Revoke Key V1 Keys  Credential Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AnswerBody":{"properties":{"content":{"type":"string","maxLength":10000,"minLength":1,"title":"Content"},"completeness":{"type":"string","pattern":"^(partial|complete)$","title":"Completeness","default":"complete"},"said_by":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Said By","description":"When the answer is someone else's words, their name: the card shows who said them and who saved them."}},"additionalProperties":false,"type":"object","required":["content"],"title":"AnswerBody"},"ApproveBody":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Reason"}},"additionalProperties":false,"type":"object","title":"ApproveBody"},"AskBody":{"properties":{"question":{"type":"string","maxLength":4000,"minLength":1,"title":"Question"},"mode":{"type":"string","const":"search","title":"Mode","description":"search: facts only, no credit spent, no gap detection. The only mode (query, with SciPot's judge, was removed on 13/10/2026).","default":"search"}},"additionalProperties":false,"type":"object","required":["question"],"title":"AskBody"},"Body_add_source_v1_brains__brain__sources_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"source_url":{"type":"string","maxLength":2000,"title":"Source Url","default":""},"title":{"type":"string","maxLength":300,"title":"Title","default":""},"source_type":{"type":"string","maxLength":32,"title":"Source Type","default":""},"document_date":{"type":"string","maxLength":40,"title":"Document Date","default":""}},"type":"object","required":["file"],"title":"Body_add_source_v1_brains__brain__sources_post"},"DeleteBody":{"properties":{"reason":{"type":"string","maxLength":1000,"minLength":1,"title":"Reason"}},"additionalProperties":false,"type":"object","required":["reason"],"title":"DeleteBody"},"DismissBody":{"properties":{"reason":{"type":"string","maxLength":1000,"minLength":1,"title":"Reason"}},"additionalProperties":false,"type":"object","required":["reason"],"title":"DismissBody"},"EvaluateBody":{"properties":{"questions":{"items":{"type":"string"},"type":"array","maxItems":25,"minItems":1,"title":"Questions"}},"additionalProperties":false,"type":"object","required":["questions"],"title":"EvaluateBody"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"KeyBody":{"properties":{"role":{"type":"string","enum":["read","ingest"],"title":"Role","description":"read for an app that only asks; ingest to also add knowledge and sources and answer gaps (a complete answer leaves the gap open until someone who curates confirms it)","default":"read"},"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name","description":"The app or agent the key is for"},"brain":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Brain","description":"The brain the key opens (id, slug or name); without it, every brain of your account. For a brain shared with you, the key opens that brain only and uses its owner's credit."}},"additionalProperties":false,"type":"object","required":["name"],"title":"KeyBody"},"KnowledgeBody":{"properties":{"content":{"type":"string","maxLength":10000,"minLength":1,"title":"Content","description":"What the expert knows, in full sentences."},"tentative":{"type":"boolean","title":"Tentative","description":"The author is not sure: lower starting certainty.","default":false},"said_by":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Said By","description":"When the content is someone else's words, their name: the card shows who said them and who saved them."}},"additionalProperties":false,"type":"object","required":["content"],"title":"KnowledgeBody"},"RejectBody":{"properties":{"reason":{"type":"string","maxLength":1000,"minLength":1,"title":"Reason"}},"additionalProperties":false,"type":"object","required":["reason"],"title":"RejectBody"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}