# Forest Infra – GitHub File Preflight

> Forest Infra – GitHub File Preflight is a paid API for AI agents from http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-02).

Fetches lightweight metadata (size, type, SHA, existence) for a file path in a public GitHub repository at an optional ref, without cloning or downloading file contents.

## Facts

- Endpoint: POST https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/repo/file-preflight?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/forest-infra-github-file-preflight-df497d8e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ve1W1CPzJbDqcnLLEHNnK

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability forest-infra-github-file-preflight-df497d8e -d '<json body>'
```

Example prompt: Can you check if the file 'src/config/settings.yaml' exists in the 'main' branch of the public repo 'acme-org/backend-service' on GitHub, and tell me its size and SHA without downloading it?

## When to prefer this

Use this endpoint when you need to confirm the existence, size, type, or SHA of a file in a public GitHub repository without the overhead of cloning or downloading file contents — ideal for preflight checks before expensive downloads, verifying schema or config file presence in CI/CD pipelines, or checking whether a dependency file exists at a specific branch.

## Known failure modes

- Path does not exist at the given ref — returns not-found or null metadata
- Repository is private or does not exist — access denied or not-found error
- Invalid repository format (not owner/name pattern) — validation error
- Invalid or non-existent ref/branch — not-found or error response
- GitHub API rate limiting or temporary unavailability — upstream error

## How this service works

Check lightweight metadata for a path in a public GitHub repository at an optional ref. It does not clone or download large file contents. Base mainnet USDC

## Output

Returns lightweight metadata about the specified file path in the GitHub repository: whether the path exists, the file type (file or directory), file size in bytes, and the Git SHA/blob hash — without transferring actual file contents.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "ref": {
   "type": "string",
   "maxLength": 256,
   "minLength": 1,
   "description": "Repository branch whose current state should be checked."
  },
  "path": {
   "type": "string",
   "maxLength": 1024,
   "minLength": 1,
   "description": "Repository file path whose public metadata should be checked."
  },
  "repository": {
   "type": "string",
   "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$",
   "maxLength": 200,
   "description": "Public owner/name repository to inspect."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/forest-infra-github-file-preflight-df497d8e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run](https://www.zero.xyz/host/http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/llms.txt)
