🎉 Kimi K2.6 has been released with improved long-context coding stability.
curl --request GET \
--url https://api.moonshot.ai/v1/files/{file_id}/content \
--header 'Authorization: Bearer <token>'"<string>"Retrieves extracted text content for files uploaded with purpose file-extract.
curl --request GET \
--url https://api.moonshot.ai/v1/files/{file_id}/content \
--header 'Authorization: Bearer <token>'"<string>"Documentation Index
Fetch the complete documentation index at: https://platform.kimi.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Usage Example
# Note: retrieve_content is marked with a warning in the latest version. Use the line below instead.
# If you are using an older version, you can use retrieve_content.
file_content = client.files.content(file_id=file_object.id).text
curl https://api.moonshot.ai/v1/files/{file_id}/content \
-H "Authorization: Bearer $MOONSHOT_API_KEY"
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.
The file identifier
Extracted file content
Extracted file content as plain text
Was this page helpful?