{"files":{"SKILL.md":"---\nname: math-api\ndescription: \"Math API skill. Use when working with Math for media. Covers 3 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Math API\nAPI version: 1.0.0\n\n## Auth\nApiKey cookie in header\n\n## Base URL\nhttps://wikimedia.org/api/rest_v1\n\n## Setup\n1. Set your API key in the appropriate header\n2. GET /media/math/formula/{hash} -- get a previously-stored formula\n3. POST /media/math/check/{type} -- create first check\n\n## Endpoints\n3 endpoints across 1 group. See references/api-spec.lap for full details.\n\n### Media\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /media/math/check/{type} | Check and normalize a TeX formula. |\n| GET | /media/math/formula/{hash} | Get a previously-stored formula |\n| GET | /media/math/render/{format}/{hash} | Get rendered formula in the given format. |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Get formula details?\" -> GET /media/math/formula/{hash}\n- \"Get render details?\" -> GET /media/math/render/{format}/{hash}\n- \"How to authenticate?\" -> See Auth section above\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Create/update endpoints return the modified resource on success\n- Error responses include status codes and descriptions in the spec\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Math API\n@base https://wikimedia.org/api/rest_v1\n@version 1.0.0\n@auth ApiKey cookie in header\n@endpoints 3\n@toc media(3)\n\n@endpoint POST /media/math/check/{type}\n@desc Check and normalize a TeX formula.\n@required {type: str(tex/inline-tex/chem) # The input type of the given formula; can be tex or inline-tex}\n@returns(200) Information about the checked formula\n@errors {400: Invalid type}\n\n@endpoint GET /media/math/formula/{hash}\n@desc Get a previously-stored formula\n@required {hash: str # The hash string of the previous POST data}\n@returns(200) Information about the checked formula\n@errors {404: Data for the given hash cannot be found}\n\n@endpoint GET /media/math/render/{format}/{hash}\n@desc Get rendered formula in the given format.\n@required {format: str(svg/mml/png) # The output format; can be svg or mml, hash: str # The hash string of the previous POST data}\n@returns(200) The rendered formula\n@errors {404: Unknown format or hash ID}\n\n@end\n"}}