Skip to main content
GET
Get File Content
The extracted content is Markdown-formatted text, not plain text:
  • Formatting in the source document (bold, headings, lists, tables, etc.) is represented with Markdown syntax — for example, bold text is wrapped in **.
  • Empty comment blocks (a <!-- --> inside a {=html} code block) may appear at structural boundaries such as list transitions. They are expected output and can be safely removed.
  • If your downstream needs plain text, parse the result as Markdown and extract the text, or strip the markers with regular expressions.

Authorizations

Authorization
string
header
required

The Authorization header expects a Bearer token. Use an MOONSHOT_API_KEY as the token. This is a server-side secret key. Generate one on the API keys page in your dashboard.

Path Parameters

file_id
string
required

The file identifier

Response

Extracted file content

Extracted file content as Markdown-formatted text