Get started
Quickstart
From nothing to a file served by the CDN, with the API only — no SDK, any language. Five steps, about five minutes.
Create your account
Create your account with Google. There is no form to fill in and no card to give: the dashboard opens as soon as you are in.
Add credit
XFiles is prepaid: what you use is drawn from your balance by the day, and there is no subscription. In the dashboard, open Billing and add credit — from $5. Uploads need a balance above zero, and the platform (search, live updates, chat, notifications, multiplayer, email) starts working once the account has had credit.
Costs: Every price is on the pricing page. A low-balance email warns you before you run out, and nothing stored is deleted at zero.
Make a project
A project is a wall around one app's data: its own files, collections, channels and mailboxes. In the dashboard, open the project menu at the top of the sidebar and choose New project. Its API key is shown once — copy it now, and keep it on your server.
1XFILES_KEY=xf_AbC12dEfGhIjKlMnOpQrStUvWxYz9012Keep it secret: The key acts as the project. Never put it in a browser or an app: browsers get short-lived tokens instead (see API keys & tokens). Lost or leaked? Rotate it under Keys & access.
Upload a file
Uploads take three calls, and the file never passes through your server: ask for an upload URL, send the bytes straight to storage, then confirm.
1printf 'Hello, world' > hello.txt2
3curl -X POST https://www.xfiles.dev/api/v1/files/upload-intent \4 -H "Authorization: Bearer $XFILES_KEY" \5 -H "Content-Type: application/json" \6 -d '{ "filename": "hello.txt", "contentType": "text/plain", "size": 12, "visibility": "public" }'1{ "fileId": "abc123def456", "uploadUrl": "https://…amazonaws.com/…?X-Amz-Signature=…", "expiresIn": 900 }1curl -X PUT "$UPLOAD_URL" -H "Content-Type: text/plain" --data-binary @hello.txt1curl -X POST https://www.xfiles.dev/api/v1/files/confirm \2 -H "Authorization: Bearer $XFILES_KEY" \3 -H "Content-Type: application/json" \4 -d '{ "fileId": "abc123def456" }'Locked in: The upload URL fixes the type and size you declared: storage refuses anything else, so a browser handed the URL cannot swap the file.
Serve it
Every file comes back with its CDN url. A public one lasts for good; a private one is signed for five minutes.
1curl https://www.xfiles.dev/api/v1/files/abc123def456 -H "Authorization: Bearer $XFILES_KEY"1{2 "file": { "id": "abc123def456", "originalFilename": "hello.txt", "visibility": "public", … },3 "url": "https://<your CDN>/files/originals/public/…/hello-k9x2m7.txt"4}Images can carry seven WebP widths for responsive pages: add "transformations": { "image": { "enabled": true } } to the upload intent, and the answer lists a url for each width.
Next steps
| API keys & tokens | Organization keys for many projects, and tokens for browsers. |
| Files API | Attach files to your objects, list them back, private links, variants, bundles. |
| Platform guide | Search, live updates, chat, notifications and multiplayer. |
| Mailboxes on your own domain. | |
| MCP server | Let your AI agent do all of the above. |
Building with an AI assistant?
Point it at the complete reference, or connect the MCP server so it can read these docs and use your project.