POST /api/v1/ingest/github
Queues a full ingestion of a GitHub repository. If an active ingestion job for the same repository is already running, BugViper returns the existing job rather than starting a duplicate. Jobs inpending or dispatched state that are older than 10 minutes are considered stale, marked failed, and a new job is started.
GitHub organization name or username (e.g.
acme-corp).Repository name as it appears on GitHub (e.g.
my-api).Branch to ingest. Defaults to the repository’s default branch (usually
main).When
true, all existing graph nodes for this repository are deleted before ingestion begins. Use this to fully re-index a repository from scratch.Response
UUID that uniquely identifies this ingestion job. Use this value to poll
/api/v1/ingest/jobs/{job_id} for status updates.Initial job status. Always
"pending" when a new job is created.Human-readable description of what was queued, e.g.
"Ingestion started for acme-corp/my-api".API path to poll for job progress, e.g.
"/api/v1/ingest/jobs/a1b2c3d4-...".Example
Ingestion runs asynchronously. Poll the
poll_url returned in the response to track progress. A typical repository takes anywhere from a few seconds to several minutes depending on size.POST /api/v1/ingest///embed
Generates semantic embeddings for code nodes in an already-ingested repository. BugViper uses the OpenRouter embeddings API to produce vectors for each function, class, and variable node. These embeddings power the semantic search endpoint. This endpoint is safe to call multiple times — nodes that already have embeddings are skipped. Use it to recover from a failed embedding step after a successful ingestion, or to generate embeddings on a repository that was ingested withoutOPENROUTER_API_KEY set.
GitHub organization name or username.
Repository name.
Firebase ID token. Format:
Bearer <token>.Response
Repository identifier in
owner/repo_name format.Total number of nodes that received embeddings in this call.
0 means all nodes already had embeddings.Count of newly embedded nodes grouped by label (e.g.
{"Function": 312, "Class": 47}). Labels with a count of zero are omitted.Human-readable summary, e.g.
"Embedded 359 nodes successfully" or "All nodes already had embeddings".Example
Embedding requires the
OPENROUTER_API_KEY environment variable to be set on the BugViper server. The endpoint returns 400 Bad Request if the key is missing.