> ## 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

# Document Download API

> 通过 AIsa 按 docID 下载 EDINET 申报文档。

## 请求规范

* **方法与路径:** GET /apis/v1/edinet/documents/\{docID}
* **可用状态:** enabled
* **请求 URL 模板:** `https://api.aisa.one/apis/v1/edinet/documents/{docID}`
* **docID:** path; 必填
* **type:** query; 必填

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

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

```json theme={null}
{
  "operationId": "get_edinet_document_download",
  "method": "GET",
  "path": "/apis/v1/edinet/documents/{docID}",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [
    {
      "description": "Document management identifier from the document list API.",
      "in": "path",
      "name": "docID",
      "required": true,
      "schema": {
        "examples": [
          "S1000000"
        ],
        "type": "string"
      }
    },
    {
      "description": "File type to download: 1 for filing body and audit report ZIP, 2 for PDF, 3 for alternate document and attachments ZIP, 4 for English document ZIP, 5 for CSV ZIP converted from XBRL.",
      "in": "query",
      "name": "type",
      "required": true,
      "schema": {
        "enum": [
          1,
          2,
          3,
          4,
          5
        ],
        "type": "integer"
      }
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "x-aisa-status": "enabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## 费用与请求规则

公开参考价格：每次成功请求 \$0.00001 USD。 账户适用价格可能不同；支持报价的接口可按实际请求获取报价。


## OpenAPI

````yaml openapi/zh/edinet.json GET /apis/v1/edinet/documents/{docID}
openapi: 3.1.0
info:
  description: ''
  title: edinet
  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:
    edinet:
      description: ''
      title: edinet
      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: e99476d645d65d34a7a7c24a39d9a83e3fd151a56e7d95967a467097d0fb477b
        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/edinet/documents.json
    - /apis/v1/edinet/documents/{docID}
  x-aisa-document:
    composer_version: '31'
    document_hash: sha256:7882a33cd9e999041630b55987ba89b04d407c90f3c84a0237ce962c5090377c
    facts_hash: e99476d645d65d34a7a7c24a39d9a83e3fd151a56e7d95967a467097d0fb477b
    generator_version: '3'
    identity_base_document_hash: sha256:ede3fbe138e0db79bba5a3b4e59c187b8f4a8f46d0bc50bdb482777840dab82d
    identity_compatibility_hash: sha256:658232bfe1bd4a916be1b52f15bc608d71508e519da36188c758e46a1ee49f9a
    protocol_version: '1'
    response_pending: []
    schema_version: '1'
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: edinet
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/edinet/documents/{docID}:
    get:
      tags:
        - default
      summary: Document Download API
      description: >-
        Downloads one filing by docID, taken from get_edinet_documents. The
        success response is a binary file, not JSON: type=1 returns the filing
        body and audit report as a ZIP archive (measured 11.9 KB, content-type
        application/octet-stream), type=2 the PDF (measured 15.0 KB,
        application/pdf). Errors still come back as JSON, so check the response
        content type before parsing. Because a tool result cannot usefully carry
        a binary payload, this endpoint stays REST-only: over MCP, stop at the
        docID from get_edinet_documents and fetch the file over REST.


        {"methods":[{"methodType":"GET","methodDesc":"Download a specific EDINET
        document by docID. The returned file type is selected by the type query
        parameter and the actual success payload must be interpreted from
        Content-Type.","requestParams":[{"paramName":"docID","paramType":"path","required":true,"desc":"Document
        management identifier from the document list API, for example
        S1234567."},{"paramName":"type","paramType":"query","required":true,"desc":"File
        type to download: 1 for filing body and audit report ZIP, 2 for PDF, 3
        for alternate document and attachments ZIP, 4 for English document ZIP,
        5 for CSV ZIP converted from
        XBRL."},{"paramName":"Subscription-Key","paramType":"query","required":true,"desc":"EDINET
        API key passed as a query
        parameter."}],"responseParams":[{"paramName":"Content-Type","desc":"Response
        MIME type. application/octet-stream indicates ZIP, application/pdf
        indicates PDF, and application/json; charset=utf-8 indicates an error
        JSON response."},{"paramName":"content","desc":"Binary ZIP or PDF file
        content on success."},{"paramName":"message","desc":"Error message when
        the response body is JSON."}]}]}
      operationId: getEdinetDocumentDownload
      parameters:
        - description: 来自文档列表 API 的文档管理标识符。
          in: path
          name: docID
          required: true
          schema:
            examples:
              - S1000000
            type: string
        - description: >-
            要下载的文件类型：1 为申报正文和审计报告 ZIP，2 为 PDF，3 为替代文档及附件 ZIP，4 为英文文档 ZIP，5 为由
            XBRL 转换的 CSV ZIP。
          in: query
          name: type
          required: true
          schema:
            enum:
              - 1
              - 2
              - 3
              - 4
              - 5
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                type: object
            application/octet-stream:
              schema:
                format: binary
                type: string
            application/pdf:
              schema:
                format: binary
                type: string
          description: 根据 Content-Type，返回二进制 ZIP/PDF 文件内容或 JSON 错误载荷。
        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.