Spooky Civic AI Hackathon · Setup
Copy-paste setup prompts
Get your key first, put it in a .envfile, then paste the prompt into Claude Code, Codex, Cursor or any coding agent. Never paste a key into the chat or commit it to GitHub. You don't have to use any of these tools. Use whatever helps you build.
Step 0
Start here (one prompt for any project)
I'm at a hackathon. Set up this project so API keys are safe:
1. Create a .env file (if missing) and add .env to .gitignore.
2. Create .env.example with these empty keys: TAVILY_API_KEY, VONAGE_API_KEY, VONAGE_API_SECRET, VONAGE_VIRTUAL_NUMBER, NVIDIA_API_KEY.
3. Load .env automatically (dotenv for Node, python-dotenv for Python).
4. Never print key values in logs or code. Tell me which keys I still need to fill in.Most teams don't
Do you even need a GPU?
- You want to: Call a strong open model (Llama, Nemotron, DeepSeek, Qwen, etc.) from your appUse build.nvidia.comFree API key, no GPU needed
- You want to: Fine-tune, run your own model, run vision on the robot camera feed, or anything that needs a real GPU boxUse BrevTeam code from staff
- You want to: Just build an appUse Your usual tools (Claude, ChatGPT, v0, Cursor, Codex)Whatever you already have
Start with build.nvidia.com. Only spin up a Brev GPU if that can't do what you need.
Web search for your AI
Tavily
Get your key (2 min)
- Scan the Tavily QR on the table (or go to app.tavily.com) and sign up.
- Redeem code SPOOKY for 8,000 free credits (valid Oct 23 to 25).
- Copy your API key (starts with
tvly-) into.envasTAVILY_API_KEY=.
Give your coding agent Tavily search (optional)
Claude Code: run this, then run /mcp, pick tavily, and sign in.
claude mcp add tavily --transport http https://mcp.tavily.com/mcp/Cursor, VS Code or Codex: add the remote MCP server URL https://mcp.tavily.com/mcp/ in your MCP settings, or see docs.tavily.com/documentation/mcp.
Prompt to add Tavily to your app
Add Tavily web search to this project.
- Use the official SDK: @tavily/core for Node/TypeScript, or tavily-python for Python.
- Read the key from TAVILY_API_KEY in .env. Never hard-code it.
- Make one function search(query) that returns the top 5 results as title, url, and a short snippet.
- Use search_depth "basic" by default so we don't burn credits.
- Add a tiny test script that searches "NYC community garden programs" and prints the results.
- If my app uses an LLM, pass the results into the prompt and make the answer cite the URLs.
Run the test and show me the output.Prize note: Tavily prize winners need an active Tavily account with real usage, so actually call it in your project.
SMS, voice, WhatsApp, video
Vonage
Get your key (3 min)
- Go to vonage.dev/SpookyCivicAIHackathon and sign up. That link adds $15 in credits.
- In the Vonage dashboard, copy your API key and API secret into
.envasVONAGE_API_KEY=andVONAGE_API_SECRET=. - To send SMS, buy or claim a virtual number in the dashboard (Numbers) and add it as
VONAGE_VIRTUAL_NUMBER=(digits only, with country code, e.g. 12015550123). - Test by texting your own phone first.
Prompt to add SMS to your app
Add Vonage SMS to this project.
- Use the official SDK: @vonage/server-sdk for Node, or the vonage package for Python.
- Read VONAGE_API_KEY, VONAGE_API_SECRET, and VONAGE_VIRTUAL_NUMBER from .env. Never hard-code them.
- Make one function sendSms(to, text). Phone numbers are digits with country code, no plus sign.
- Handle errors clearly: print the Vonage error message if a send fails.
- Add a test script that sends "Hello from the Spooky Civic AI Hackathon" to a number I pass on the command line.
Don't run the test until I give you my phone number.Want to receive texts too?
Add an inbound SMS webhook for Vonage.
- Create a POST route /webhooks/inbound-sms that logs the sender and message text and returns 200.
- Tell me how to expose it locally (ngrok or similar) and exactly where to paste the URL in the Vonage dashboard.
- Then make it auto-reply using my sendSms function.Optional: the Vonage MCP server for your agent (package @vonage/vonage-mcp-server-api-bindings, needs an app ID and base64 private key). Setup: developer.vonage.com/en/mcp-server. Only worth it if you're building an agent that sends messages itself.
Free API, no GPU
NVIDIA models (build.nvidia.com)
Use this for open models (Llama, Nemotron, Mistral, DeepSeek and more) without a GPU.
Get your key (2 min)
- Go to build.nvidia.com, sign in (free NVIDIA account), pick a model, and click Get API Key.
- Copy the key (starts with
nvapi-) into.envasNVIDIA_API_KEY=. Never commit it. - The API is OpenAI-compatible. Base URL:
https://integrate.api.nvidia.com/v1. Model name: copy the exact ID from the model's page.
Prompt
Connect this project to NVIDIA's hosted models at build.nvidia.com.
- Use the official OpenAI SDK (openai for Node or Python) with baseURL https://integrate.api.nvidia.com/v1.
- Read the key from NVIDIA_API_KEY in .env.
- Use the model ID I give you (copy it exactly from the model page on build.nvidia.com). Put it in one constant so I can swap models.
- Make one function ask(prompt) that streams the reply to the console.
- Add a test script that asks "Explain what a civic tech hackathon is in two sentences."
Run it and show me the output. If you get a 404, the model ID is wrong, so ask me for it.Or write it yourself
from openai import OpenAI
import os
client = OpenAI(
base_url="https://integrate.api.nvidia.com/v1",
api_key=os.environ["NVIDIA_API_KEY"],
)
resp = client.chat.completions.create(
model="PASTE_MODEL_ID_FROM_BUILD_NVIDIA_COM",
messages=[{"role": "user", "content": "Summarize this 311 complaint in one line: ..."}],
)
print(resp.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://integrate.api.nvidia.com/v1",
apiKey: process.env.NVIDIA_API_KEY,
});
const resp = await client.chat.completions.create({
model: "PASTE_MODEL_ID_FROM_BUILD_NVIDIA_COM",
messages: [{ role: "user", content: "Hello" }],
});
console.log(resp.choices[0].message.content);curl https://integrate.api.nvidia.com/v1/chat/completions \
-H "Authorization: Bearer $NVIDIA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"PASTE_MODEL_ID","messages":[{"role":"user","content":"hi"}]}'Each model page has a ready-made code snippet. Free keys have rate limits: if you get 429 errors, slow down or add a retry. Vision and speech models live in the same catalog (useful for the robot camera, drone plant-health photos, or voice apps).
Using it with coding agents
Want your agent to write an app that uses NVIDIA models? Keep your agent on its normal model and tell it this (put NVIDIA_API_KEY in .env and add .env to .gitignore):
Build this using the OpenAI SDK pointed at NVIDIA's API. Base URL https://integrate.api.nvidia.com/v1, model <model ID>, API key from the NVIDIA_API_KEY environment variable. Never hard-code the key.Want Codex itself to run on an NVIDIA model? Add this to ~/.codex/config.toml:
model = "PASTE_MODEL_ID_FROM_BUILD_NVIDIA_COM"
model_provider = "nim"
[model_providers.nim]
name = "NVIDIA NIM"
base_url = "https://integrate.api.nvidia.com/v1"
env_key = "NIM_API_KEY"export NIM_API_KEY=your-nvapi-key
codexIf Codex errors about the API format, add wire_api = "chat" under [model_providers.nim] (or "responses" if your version asks for it). Pick a model built for coding and tool use; small models struggle as agents.
Claude Code speaks Anthropic's API format, so it can't point at NVIDIA directly. This weekend, use it normally and have it write NVIDIA-powered code. Cursor, Continue and other OpenAI-compatible editors: add a custom OpenAI model with the base URL above, your nvapi- key, and the model ID.
Team captains only
Brev (your own GPU)
One code per team ($75), from staff in person or by messaging Maria on Discord. The whole team shares that GPU. Codes expire Mon Oct 26. Only needed if you're running or fine-tuning a model yourself.
- Go to brev.nvidia.com and sign up with the captain's email.
- Redeem the code under Billing / Credits. Confirm the credit shows before launching anything.
- Create an instance. Start small (one GPU, e.g. L4, A10 or L40S) with a PyTorch template.
- Check the GPU works:
nvidia-smi. - Share access through the Brev org settings, or have one person drive.
brew install brevdev/homebrew-brev/brev # Mac; Linux install steps are in the Brev docs
brev login
brev create my-team-gpu # add --gpu <type> to choose a GPU
brev shell my-team-gpu # terminal on the GPU box
brev open my-team-gpu # opens it in VS Code / Cursor
brev port-forward my-team-gpu # view a web app or Jupyter running on the boxPrompt (run inside the Brev instance)
I'm on a Brev GPU instance at a hackathon. Help me:
1. Check the GPU with nvidia-smi and tell me what we have.
2. Serve the open model I name with vLLM as an OpenAI-compatible server on port 8000.
3. Give me a curl command to test it, and the base URL + model name to use from my app.
4. Remind me how to stop the instance so we don't waste credits.
Keep everything in one setup.sh so a teammate can rerun it.To run Codex or Claude Code on the box, SSH in with brev shell, install the CLI there, and work inside the box, or use brev openand run the agent from VS Code or Cursor's terminal.
Don't burn your credits
- Stop the instance when you're not using it (
brev stop my-team-gpu). A running GPU drains credits overnight. - Delete it when the hackathon ends.
- Push your code to GitHub often. Stopped or deleted boxes can lose work.
Stuck?
Type /mentor in Discord, or ask anyone wearing a name tag. Credit problems: Tavily and Vonage use the links above; for Brev, ask staff.