▶ Sign up free for the video, slides & prompts
The lesson below is open to all. Enter your email once to unlock every video, slide deck, prompt and code example on this device.
Checking…
Deploy for free
Put your API online and share the link.
🎬 Video version coming soon — read it now
An API on your laptop is a project. An API on the internet, with a link you can share, is a portfolio piece. Several platforms offer free or low-cost tiers suitable for learning projects.
Options to look at
Free tiers and limits change often, so check each platform's current pricing page:
- Render: connects to your GitHub repo and builds from a Dockerfile or a Python start command. Free web services typically sleep when idle and take a few seconds to wake up
- Hugging Face Spaces: free hosting for demos, including Docker-based apps, popular for AI projects
- Railway, Fly.io, Koyeb: similar container-hosting platforms, with trial credits or small free allowances
- Google Cloud Run, AWS and Azure: generous free tiers but more setup, and you'll usually need a payment card
The general flow (Render as the example)
- Push your project to GitHub, with the Dockerfile and
.dockerignore, and without.env. - On Render: New → Web Service → connect your repository.
- Choose Docker as the runtime (or a Python start command like
fastapi run main.py --port $PORT). - In Environment, add
ANTHROPIC_API_KEYand any other settings. - Set the health check path to
/health. - Deploy. A few minutes later you get a URL like
https://feedback-api.onrender.com.
From then on, every push to the main branch deploys automatically.
Listen on the platform's port
Many platforms tell your app which port to use through a PORT environment variable:
After deploying: check it like a user
- Open
/docson the live URL and try every endpoint - Check the platform's logs for errors and startup messages
- Try bad input: does it fail politely?
- Watch your AI provider's usage dashboard after testing
Protect a public AI endpoint
A public URL that calls a paid AI model is an open wallet. Before sharing the link widely:
- Require an access key for the AI endpoint, or keep a strict per-user rate limit
- Keep the input length limit
- Set a low monthly spending limit at the AI provider
- Consider a demo mode that serves cached example answers to anonymous visitors
Show it off
Add to your README and resume: the live URL, the /docs link, a screenshot, the tech stack (FastAPI, Pydantic, Docker, pytest) and one line on what you learned. A working link gets far more attention from recruiters than "built a project".
In one line
Push to GitHub, connect a hosting platform, set secrets and a health check in its dashboard, and protect any public AI endpoint before sharing the link.
Share with a friend