Repositories
Create private git repositories hosted by Sapiom and backed by GitHub. Clone and push immediately using your Sapiom API key as the git password — no GitHub account, no SSH key setup.
Ways to call this
Section titled “Ways to call this”Reach repositories from a step through the typed ctx.sapiom.repositories client (create, get, list, delete, attach) — sapiom_dev_orchestrations_check validates the call at author time. See Using Capabilities.
Call sapiom_git_create_repo, sapiom_git_list_repos, sapiom_git_get_repo, or sapiom_git_delete_repo directly via the remote MCP — no workflow to author. Run tool_discover to find tools by goal.
Wrap your HTTP client with @sapiom/fetch (or @sapiom/axios) and call the gateway directly — from anywhere, including inside a workflow step. See the Quick Example below and the API reference for full parameters.
Quick Example
Section titled “Quick Example”import { createFetch } from "@sapiom/fetch";
const sapiomFetch = createFetch({ apiKey: process.env.SAPIOM_API_KEY, agentName: "my-agent",});
const baseUrl = "https://git.services.sapiom.ai";
// 1. Create a private repository — one-time $0.01 chargeconst createRes = await sapiomFetch(`${baseUrl}/v1/git/repositories`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ slug: "my-agent-repo" }),});const { slug, cloneUrl } = await createRes.json();
// 2. Clone using your API key as the git password (username is ignored)// git clone https://x:<SAPIOM_API_KEY>@git.services.sapiom.ai/...console.log(`Clone with: git clone ${cloneUrl}`);To push an existing local repo to a newly created Sapiom repository:
# Add the remote (username is ignored — use any value such as "x")git remote add origin https://x:${SAPIOM_API_KEY}@git.services.sapiom.ai/<tenant>/<slug>
# Pushgit push -u origin mainHow It Works
Section titled “How It Works”Repositories are Sapiom-hosted and GitHub-backed. When you create a repository, Sapiom provisions a private GitHub repository under a Sapiom-managed GitHub App installation. The clone URL is proxied through Sapiom’s git service — you authenticate with your Sapiom API key as the git password; the username field is ignored.
Creating a repository carries a one-time $0.01 fee (deducted from your prepaid balance via x402). Listing, reading, and deleting repositories are free — they’re identified operations that don’t require a micropayment.
Provider
Section titled “Provider”Powered by GitHub (private repos under a Sapiom-managed GitHub App). Repositories are provisioned via GitHubAppService and stored under Sapiom’s managed GitHub organization.
API Reference
Section titled “API Reference”Endpoints
Section titled “Endpoints”Base URL: https://git.services.sapiom.ai
| Method | Path | Description | Pricing |
|---|---|---|---|
| POST | /v1/git/repositories | Create a new private repository | $0.01 (one-time) |
| GET | /v1/git/repositories | List your repositories | Free |
| GET | /v1/git/repositories/:slug | Get a repository by slug | Free |
| DELETE | /v1/git/repositories/:slug | Delete a repository | Free |
Create repository
Section titled “Create repository”Endpoint: POST https://git.services.sapiom.ai/v1/git/repositories
Creates a new private git repository. Returns the clone URL and authentication guidance. A $0.01 one-time fee is charged at creation via the x402 payment guard — ensure your Sapiom balance is funded.
Request
Section titled “Request”| Parameter | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | Repository name: lowercase letters, digits, and dashes; unique within your account. e.g. "billing-bot" |
{ "slug": "billing-bot" }Response
Section titled “Response”{ "tenantId": "tenant_abc123", "slug": "billing-bot", "cloneUrl": "https://git.services.sapiom.ai/...", "auth": { "scheme": "basic", "username": "(ignored)", "password": "<your-sapiom-api-key>", "example": "git clone https://x:<SAPIOM_API_KEY>@git.services.sapiom.ai/..." }}List repositories
Section titled “List repositories”Endpoint: GET https://git.services.sapiom.ai/v1/git/repositories
Returns all repositories for the calling tenant — slug, clone URL, status, and creation timestamp. Free.
Response
Section titled “Response”{ "repositories": [ { "slug": "billing-bot", "cloneUrl": "https://git.services.sapiom.ai/...", "status": "active", "createdAt": "2026-06-25T04:00:00.000Z" } ]}Get repository
Section titled “Get repository”Endpoint: GET https://git.services.sapiom.ai/v1/git/repositories/:slug
Returns metadata for a single repository by its slug. Free.
Response
Section titled “Response”{ "slug": "billing-bot", "cloneUrl": "https://git.services.sapiom.ai/...", "status": "active", "createdAt": "2026-06-25T04:00:00.000Z"}Delete repository
Section titled “Delete repository”Endpoint: DELETE https://git.services.sapiom.ai/v1/git/repositories/:slug
Permanently deletes the repository and its upstream GitHub backing. This action is irreversible. Free.
Returns 204 No Content on success.
Error Codes
Section titled “Error Codes”| Code | Description |
|---|---|
| 400 | Invalid request — e.g. malformed slug or slug already in use |
| 402 | Payment or identity required — the git gateway uses @X402Payment(IdentityOrPaymentResolver) on all routes. For list/get/delete, this means a missing or invalid Sapiom API key triggers an x402 payment challenge (HTTP 402), not 401. For create, an insufficient balance also produces 402. Ensure your SDK is configured with a valid API key and, for create, that your balance covers the $0.01 fee. |
| 404 | Repository not found |
Limits
Section titled “Limits”| Limit | Value |
|---|---|
| Max repositories per tenant | 100 |
Pricing
Section titled “Pricing”| Operation | Price |
|---|---|
| Create repository | $0.01 (one-time, per repo) |
| List repositories | Free |
| Get repository | Free |
| Delete repository | Free |
Repository creation debits $0.01 from your prepaid Sapiom balance via the x402 payment guard. If your balance is insufficient (or if no valid identity is provided), the gateway returns 402 (an x402 payment challenge). List, get, and delete are free for an identified caller — a valid Sapiom API key is sufficient.