POST
Generate CODE.md
https://codeval.ai/code-md
Pass a public GitHub repository URL and receive a code.md file as a plain-text download.
The file contains the repository's callgraph entry points, top connected functions, file dependency graph,
UI element map, source inventory, TODO signals, and risk areas — all extracted from real parser evidence, no LLM guessing.
Note: the repository must have been analyzed by CodeVal first.
If it hasn't, the API returns 404 with instructions to run the analysis from the
CodeVal dashboard.
Request
repo_url required
string
Public GitHub repository URL. Example: https://github.com/django/django
Code samples
cURL
curl -X POST "https://codeval.ai/code-md" \ -H "Content-Type: application/json" \ -d '{"repo_url":"https://github.com/owner/repo"}' \ --output code.md
Python
import requests url = "https://codeval.ai/code-md" body = {"repo_url": "https://github.com/owner/repo"} resp = requests.post(url, json=body) resp.raise_for_status() with open("code.md", "w") as f: f.write(resp.text) print("Saved code.md")
JavaScript (fetch)
const resp = await fetch("https://codeval.ai/code-md", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ repo_url: "https://github.com/owner/repo" }) }); const text = await resp.text(); // text contains the full code.md content console.log(text.slice(0, 200));
Response
awaiting…
đź“„
Hit "Get CODE.md" to generate and preview
the code.md file for your repository.
Response schema
Fields in code.md
## systemsectionRepo name, primary languages, line count, generated_at timestamp.
## repository_structuresectionFolder layout, file counts, naming conventions detected from paths.
## callgraphsectionEntry points, top connected nodes, node + edge counts from the parser callgraph.
## filegraphsectionFile-level dependency layers, core files ranked by degree.
## behaviorsectionfunction_meaning for key features (when feature summaries exist), constraints, error rules.
## commit_intentsectionHigh-risk file paths from quality signals, recent change cache flag.
## errorssectionStatic quality signal findings mapped by finding ID to file path.
## validationsectionCritical flows, invariants, and browser test names detected from analysis.
## glossarysectionDefinitions for terms used in the file.
Error responses
Errors
400Bad Requestrepo_url is missing or not a valid GitHub URL.
404Not FoundRepository has not been analyzed yet. Analyze it first from the dashboard, then call /code-md again.
500Server ErrorCODE.md generation failed. Retry or re-analyze the repository.