跳转到主要内容
POST
File

请求规范

  • 方法与路径: POST /apis/v1/github/repositories/file
  • 可用状态: enabled
  • 请求 URL 模板: https://api.aisa.one/apis/v1/github/repositories/file
完整 OpenAPI 定义 有效请求声明(包括认证和引用的 schema):

费用与请求规则

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

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
path
string
必填

File path inside the repository, for example skills/frontend-design/SKILL.md.

ref
string

Branch, tag or commit SHA, with repo and path. Defaults to HEAD, the default branch.

repo
string

Repository as owner/name, for example anthropics/skills. Requires path. Pattern: ^@?/?A-Za-z0-9 [blocked]?/[A-Za-z0-9._-]{1,100}(?:.git)?/?$.

url
string

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]+(?:[?#].*)?$.

响应

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.

These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.