Skip to content
Back to skills

Summaries

ASecurity

Python Files API reference inside the `claude-api` skill. Files API uploads files for use in Messages API requests; reference via `file_id` in content blocks. **Beta header**: `files-api-2025-04-14` (SDK sets automatically when you pass `betas=["files-api-2025-04-14"]`). **Key facts**: - Max file size: 500 MB. - Total org storage: 100 GB. - Files persist until deleted. - Operations (upload/list/delete) free; content used in messages billed as input tokens. - **NOT available on Bedrock or Vert...

  • 8 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 30, 2026
ai-agentspythongitapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned November 30, 2026

npx -y skills add NickCollect/ai-coding-runbook --skill Summaries --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Summaries?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Summaries
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nickcollect-summaries-297f81c8/badge)](https://www.skillsdirectory.com/skills/nickcollect-summaries-297f81c8)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
type: summary
source: 01_Raw/github/anthropics/skills/skills/claude-api/python/claude-api/files-api.md
title: "claude-api skill: Files API — Python"
summarized_at: 2026-05-05
entities_referenced: [Skill]
concepts_referenced: []
---

Python Files API reference inside the `claude-api` skill. Files API uploads files for use in Messages API requests; reference via `file_id` in content blocks.

**Beta header**: `files-api-2025-04-14` (SDK sets automatically when you pass `betas=["files-api-2025-04-14"]`).

**Key facts**:
- Max file size: 500 MB.
- Total org storage: 100 GB.
- Files persist until deleted.
- Operations (upload/list/delete) free; content used in messages billed as input tokens.
- **NOT available on Bedrock or Vertex**.

**Upload**: `client.beta.files.upload(file=("name.pdf", open(...), "application/pdf"))` returns object with `id`, `size_bytes`.

**Use in messages** — wrap content block as document:
```python
{
  "type": "document",
  "source": {"type": "file", "file_id": uploaded.id},
  "title": "Q4 Report",                # optional
  "citations": {"enabled": True}        # optional, enables citations
}
```
Or image: `{"type": "image", "source": {"type": "file", "file_id": image_file.id}}`.

**Manage**:
- `client.beta.files.list()` → `files.data` iterable.
- `client.beta.files.retrieve_metadata(file_id)`.
- `client.beta.files.delete(file_id)`.
- `client.beta.files.download(file_id).write_to_file("output.txt")` — only works for files created by code execution tool or skills, NOT user-uploaded files.

**End-to-end pattern**: upload contract.pdf once, ask N questions referencing same `file_id`, delete when done. Avoids re-upload across calls.

Files in this skill

  • 100k-context-windows--anthropic-news.md1.2 KB
  • 2026-w13.md2.5 KB
  • 2026-w14.md2.5 KB
  • 2026-w15.md2.5 KB
  • 2026-w16.md3.3 KB
  • 2026-w17.md2.9 KB
  • 3-5-models-and-computer-use--anthropic-news.md1.8 KB
  • 3p-updates--internal-comms.md1.6 KB
  • 81k-economics--anthropic-research.md2.3 KB
  • AGENTS--codex-openai.md1.8 KB
  • AGENTS--mcp-py-sdk.md3.1 KB
  • AGENTS--mcp-spec.md860 B
  • AI-assistance-coding-skills--anthropic-research.md1.3 KB
  • AI-fluency-index--anthropic-research.md1.2 KB
  • AI-resistant-technical-evaluations--anthropic-eng.md2.5 KB
  • ANTITRUST--mcp-spec.md569 B
  • AmazonBedrock-CONTRIBUTING--prompt-eng-tutorial.md1.3 KB
  • AmazonBedrock-README--prompt-eng-tutorial.md1.8 KB
  • CHANGELOG--agent-sdk-py-repo.md3.2 KB
  • CHANGELOG--anthropic-sdk-py.md1.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.