> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# File

> The text of one file in a public GitHub repository at a branch, tag or commit, given as a raw.githubusercontent.com URL, a github.com blob URL, or repo plus path (ref defaults to HEAD, the default branch). One ranged GET to raw.githubusercontent.com, which does not use the REST API's 60/hour quota. Returns at most the first 1 MiB: size_bytes is the full size and truncated marks a cut file, reported as partial. A binary or non-UTF-8 file fails with invalid_input (not_text); a missing file, ref or repository is not_found.

## 请求规范

* **方法与路径:** POST /apis/v1/github/repositories/file
* **可用状态:** enabled
* **请求 URL 模板:** `https://api.aisa.one/apis/v1/github/repositories/file`

[完整 OpenAPI 定义](https://aisa.one/docs/openapi-public/zh/github.json)

有效请求声明（包括认证和引用的 schema）：

```json theme={null}
{
  "operationId": "github.repositories.file",
  "method": "POST",
  "path": "/apis/v1/github/repositories/file",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "examples": {
          "provider": {
            "summary": "Official provider example; checked against AIsa request constraints",
            "value": {
              "url": "https://raw.githubusercontent.com/firecrawl/firecrawl/386330419c6924cc5d733e59abca9b857241acc4/.gitignore"
            }
          }
        },
        "schema": {
          "additionalProperties": true,
          "allOf": [
            {
              "anyOf": [
                {
                  "properties": {
                    "path": {}
                  },
                  "required": [
                    "path"
                  ]
                },
                {
                  "properties": {
                    "repo": {}
                  },
                  "required": [
                    "repo"
                  ]
                },
                {
                  "properties": {
                    "url": {}
                  },
                  "required": [
                    "url"
                  ]
                }
              ]
            }
          ],
          "properties": {
            "path": {
              "description": "File path inside the repository, for example `skills/frontend-design/SKILL.md`.",
              "type": "string"
            },
            "ref": {
              "description": "Branch, tag or commit SHA, with repo and path. Defaults to HEAD, the default branch.",
              "type": "string",
              "x-alexandria-option-metadata": {
                "in": "body"
              }
            },
            "repo": {
              "description": "Repository as `owner/name`, for example `anthropics/skills`. Requires path. Pattern: ^@?/?[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?/[A-Za-z0-9._-]{1,100}(?:\\.git)?/?$.",
              "type": "string"
            },
            "url": {
              "description": "https://raw.githubusercontent.com/{owner}/{name}/{ref}/{path} or https://github.com/{owner}/{name}/blob/{ref}/{path}. The ref is one segment (branch, tag or SHA) or refs/heads/{branch}. Provide exactly one of url or repo with path. Pattern: ^(?:https?://)?(?:raw\\.githubusercontent\\.com/[^/?#\\s]+/[^/?#\\s]+/|(?:www\\.)?github\\.com/[^/?#\\s]+/[^/?#\\s]+/(?:blob|raw)/)[^?#\\s]+(?:[?#].*)?$.",
              "type": "string"
            }
          },
          "type": "object"
        }
      }
    },
    "required": true
  },
  "x-aisa-status": "enabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## 费用与请求规则

按实际用量收费。 默认请求预估费用：\$0.0001 USD。 最终费用以实际用量为准。 账户适用价格可能不同；支持报价的接口可按实际请求获取报价。


## OpenAPI

````yaml openapi-public/zh/github.json POST /apis/v1/github/repositories/file
openapi: 3.1.0
info:
  description: ''
  title: GitHub
  version: '1'
  x-aisa-capabilities:
    idempotency: Idempotency-Key
    max_price: X-AISA-Max-Price-USD
    quote:
      header: X-AISA-Cost-Mode
      value: quote
  x-aisa-catalogs:
    github:
      description: ''
      title: GitHub
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
      x-aisa-document:
        facts_hash: 73828e8d56ce13a665df0455fed65723eef8eca8b9daaf3df1dc8393b54fda3a
        generator_version: '3'
        protocol_version: '1'
        schema_version: '1'
      x-aisa-plans:
        builder: 1
        display_plan: payg
        payg: 1
        similarweb_payg: 1
        team: 1
        version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-configured-paths:
    - /apis/v1/github/profiles/{handle}
    - /apis/v1/github/profiles/{handle}/activity
    - /apis/v1/github/profiles/{handle}/contributions
    - /apis/v1/github/profiles/{handle}/followers
    - /apis/v1/github/profiles/{handle}/following
    - /apis/v1/github/profiles/{handle}/pull-requests
    - /apis/v1/github/profiles/{handle}/repositories
    - /apis/v1/github/repositories
    - /apis/v1/github/repositories/advisory
    - /apis/v1/github/repositories/contributors
    - /apis/v1/github/repositories/file
    - /apis/v1/github/repositories/issue-counts
    - /apis/v1/github/repositories/issues
    - /apis/v1/github/repositories/labels
    - /apis/v1/github/repositories/latest-release
    - /apis/v1/github/repositories/malware-advisories
    - /apis/v1/github/repositories/releases
    - /apis/v1/github/repositories/repo
    - /apis/v1/github/repositories/repo-advisories
    - /apis/v1/github/repositories/search-advisories
    - /apis/v1/github/repositories/search-repos
    - /apis/v1/github/trending/developers
    - /apis/v1/github/trending/repositories
  x-aisa-document:
    composer_version: '31'
    facts_hash: 73828e8d56ce13a665df0455fed65723eef8eca8b9daaf3df1dc8393b54fda3a
    generator_version: '3'
    protocol_version: '1'
    response_pending: []
    schema_version: '1'
    public_projection:
      version: '4'
      source_document_hash: sha256:a055d89f62349e434a949353c82c3e802d4c1431c066f986216eec578e7f054b
    document_hash: sha256:9dc6e539704826c0c3ce6b4314a66e0e0af86714e3c0350d0ce04fdb4b5c98ce
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: github
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/github/repositories/file:
    post:
      tags:
        - GitHub
      summary: File
      description: >-
        The text of one file in a public GitHub repository at a branch, tag or
        commit, given as a raw.githubusercontent.com URL, a github.com blob URL,
        or repo plus path (ref defaults to HEAD, the default branch). One ranged
        GET to raw.githubusercontent.com, which does not use the REST API's
        60/hour quota. Returns at most the first 1 MiB: size_bytes is the full
        size and truncated marks a cut file, reported as partial. A binary or
        non-UTF-8 file fails with invalid_input (not_text); a missing file, ref
        or repository is not_found.
      operationId: github.repositories.file
      requestBody:
        content:
          application/json:
            examples:
              provider:
                summary: >-
                  Official provider example; checked against AIsa request
                  constraints
                value:
                  url: >-
                    https://raw.githubusercontent.com/firecrawl/firecrawl/386330419c6924cc5d733e59abca9b857241acc4/.gitignore
            schema:
              additionalProperties: true
              allOf:
                - anyOf:
                    - properties:
                        path: {}
                      required:
                        - path
                    - properties:
                        repo: {}
                      required:
                        - repo
                    - properties:
                        url: {}
                      required:
                        - url
              properties:
                path:
                  description: >-
                    File path inside the repository, for example
                    `skills/frontend-design/SKILL.md`.
                  type: string
                ref:
                  description: >-
                    Branch, tag or commit SHA, with repo and path. Defaults to
                    HEAD, the default branch.
                  type: string
                  x-alexandria-option-metadata:
                    in: body
                repo:
                  description: >-
                    Repository as `owner/name`, for example `anthropics/skills`.
                    Requires path. Pattern:
                    ^@?/?[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?/[A-Za-z0-9._-]{1,100}(?:\.git)?/?$.
                  type: string
                url:
                  description: >-
                    https://raw.githubusercontent.com/{owner}/{name}/{ref}/{path}
                    or https://github.com/{owner}/{name}/blob/{ref}/{path}. The
                    ref is one segment (branch, tag or SHA) or
                    refs/heads/{branch}. Provide exactly one of url or repo with
                    path. Pattern:
                    ^(?:https?://)?(?:raw\.githubusercontent\.com/[^/?#\s]+/[^/?#\s]+/|(?:www\.)?github\.com/[^/?#\s]+/[^/?#\s]+/(?:blob|raw)/)[^?#\s]+(?:[?#].*)?$.
                  type: string
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                provider:
                  description: >-
                    Published by the provider on
                    2026-10-16T17:36:53.214181+00:00.
                  summary: Official provider example
                  value:
                    content: |-
                      .DS_Store
                      /node_modules/
                      /dist/
                      .env
                      *.csv
                      dump.rdb
                      /mongo-data
                      apps/js-sdk/node_modules/

                      apps/api/.env.local

                      apps/test-suite/node_modules/


                      apps/test-suite/.env
                      apps/test-suite/logs

                      apps/playwright-service-ts/node_modules/
                      apps/playwright-service-ts/package-lock.json


                      /examples/o1_web_crawler/venv
                      *.pyc
                      .rdb

                      apps/js-sdk/firecrawl/dist

                      /examples/o1_web_crawler/firecrawl_env
                      /examples/crm_lead_enrichment/crm_lead_enrichment_env
                      /.venv
                      /examples/claude_web_crawler/firecrawl_env
                      /examples/haiku_web_crawler/firecrawl_env
                      /examples/sonnet_web_crawler/firecrawl_env
                      /examples/internal_link_assitant/firecrawl_env

                      /apps/api/logs/*
                      /apps/api/debug/*

                      .vscode
                      llm-links.txt
                      mapped-links.txt
                      gke-key.json

                      CLAUDE.local.md

                      *.egg-info/
                      # local SDK venv
                      apps/python-sdk/.venv/

                      /apps/api/running-docs/


                      /apps/go-html-to-md-service/.gomodcache/
                      target/

                      .cursor/

                      # local files
                      _local/


                      apps/api/src/lib/scrape-interact/*.md
                      .pnpm-store

                      # stray test runner logs
                      vitest.out

                      tmp/
                    content_type: text/plain; charset=utf-8
                    observed_at_ms: 1792172213215
                    path: .gitignore
                    ref: 386330419c6924cc5d733e59abca9b857241acc4
                    repo: firecrawl/firecrawl
                    returned_bytes: 982
                    size_bytes: 982
                    source_url: >-
                      https://github.com/firecrawl/firecrawl/blob/386330419c6924cc5d733e59abca9b857241acc4/.gitignore
                    truncated: false
                    upstream_requests: 1
                    url: >-
                      https://raw.githubusercontent.com/firecrawl/firecrawl/386330419c6924cc5d733e59abca9b857241acc4/.gitignore
              schema:
                not:
                  type: 'null'
                x-aisa-schema-completeness: documented-fields-only
          description: >-
            The text of one file in a public GitHub repository at a branch, tag
            or commit, given as a raw.githubusercontent.com URL, a github.com
            blob URL, or repo plus path (ref defaults to HEAD, the default
            branch). One ranged GET to raw.githubusercontent.com, which does not
            use the REST API's 60/hour quota. Returns at most the first 1 MiB:
            size_bytes is the full size and truncated marks a cut file, reported
            as partial. A binary or non-UTF-8 file fails with invalid_input
            (not_text); a missing file, ref or repository is not_found.


            The response contains the tool result directly.


            | Documented field | Provider type | Description |

            | --- | --- | --- |

            | `content` | string | The file's text; the first 1 MiB when
            truncated, cut at a character boundary. |

            | `content_type` | string | Content-Type GitHub served. |

            | `observed_at_ms` | number |  |

            | `path` | string | File path as requested, URL-encoded. |

            | `ref` | string | Branch, tag, SHA or HEAD as requested,
            URL-encoded. |

            | `repo` | string | owner/name as requested. |

            | `returned_bytes` | number | UTF-8 bytes in content. |

            | `size_bytes` | number | Full file size in bytes. |

            | `source_url` | string |
            https://github.com/{owner}/{name}/blob/{ref}/{path} |

            | `truncated` | boolean | True when the file is larger than content.
            |

            | `upstream_requests` | number |  |

            | `url` | string | The raw.githubusercontent.com URL read. |



            These are the provider's documented fields. Field requiredness,
            nullability and nested object structures are specified only where
            the descriptions explicitly say so.
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.