Overview
Static resources are files or datasets that users can access through payment plans. Unlike AI agents that process requests, static resources are downloadable content such as:- Documents (PDFs, reports)
- Datasets (CSV, JSON files)
- Media files (images, videos)
- Software packages
Register Static Resource Agents
Static resources are registered as a special type of agent with file endpoints:Using Wildcards for Multiple Files
When you have multiple files that follow a pattern, you can use wildcard URLs:Wildcard Patterns
| Pattern | Matches |
|---|---|
*.pdf | Any PDF file |
report-*.pdf | report-001.pdf, report-2024.pdf |
data/*.csv | All CSV files in data folder |
v*/data.json | v1/data.json, v2/data.json |
Complete Example: Dataset Publishing
Example: Document Repository
Example: Software Distribution
Accessing Static Resources
For details on how subscribers access static resources using x402 access tokens, see Request Validation.Best Practices
- Use descriptive metadata: Include clear names, descriptions, and tags for discoverability
- Organize files logically: Use consistent URL patterns that work well with wildcards
- Version your resources: Include version numbers in URLs for easy updates
-
Provide a manifest: Create a JSON manifest at the
agent_definition_urllisting all available files - Set appropriate credits: Consider the value and size of files when setting credit costs