Pack Repo
Premium · 5 creditsPack an entire Git repository into a single document — ideal for feeding codebases into LLM context windows. Powered by Repomix.
POST /api/pack-repo
Section titled “POST /api/pack-repo”Parameters
Section titled “Parameters”| Field | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | Yes | — | Git repository URL |
format | string | No | xml | Output format: xml, markdown, json, plain |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
content | string | Packed repository content |
format | string | Format used |
files_count | integer | Number of files packed |
token_count | integer | Estimated token count |
Examples
Section titled “Examples”XML format (default)
Section titled “XML format (default)”curl -X POST https://morso.dev/api/pack-repo \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://github.com/user/small-repo"}'{ "content": "<repository>\n<file path=\"README.md\">\n# My Project\n...\n</file>\n<file path=\"main.go\">\npackage main\n...\n</file>\n</repository>", "format": "xml", "files_count": 12, "token_count": 4500}Markdown format
Section titled “Markdown format”curl -X POST https://morso.dev/api/pack-repo \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://github.com/user/small-repo", "format": "markdown"}'{ "content": "# Repository: small-repo\n\n## README.md\n\n```\n# My Project\n...\n```\n\n## main.go\n\n```go\npackage main\n...\n```", "format": "markdown", "files_count": 12, "token_count": 4600}Errors
Section titled “Errors”- 400 — Missing URL, invalid format, repomix unavailable, or timeout (120s limit).
See Errors for the standard error shape.