Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/image-url.jpg%20%22Image%20title%22?q=api&page=77&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=api

Returns an array of strings in format "username" or "username/projectName"

Found 12500 results for "api"(1632ms)

19 console.log(`📤 Sending follow-up message: ${content}`);
20 try {
21 await fetch(`https://discord.com/api/v10/webhooks/${applicationId}/${interactionToken}/messages/@original`, {
22 method: "PATCH",
23 headers: {
50 : `applications/${DISCORD_APP_ID}/commands`;
51
52 console.log(`📡 Using API endpoint: ${endpoint}`);
53
54 try {
58
59 // Register the command using POST for a single command
60 const response = await fetch(`https://discord.com/api/v10/${endpoint}`, {
61 method: "POST", // Using POST for single command creation
62 headers: {
57 : `applications/${DISCORD_APP_ID}/commands`;
58
59 console.log(`📡 Using API endpoint: ${endpoint}`);
60 const results = [];
61
67
68 // Register the command using POST for a single command
69 const response = await fetch(`https://discord.com/api/v10/${endpoint}`, {
70 method: "POST", // Using POST for single command creation
71 headers: {
50 : `applications/${DISCORD_APP_ID}/commands`;
51
52 console.log(`📡 Using API endpoint: ${endpoint}`);
53
54 try {
58
59 // Register the command using POST for a single command
60 const response = await fetch(`https://discord.com/api/v10/${endpoint}`, {
61 method: "POST", // Using POST for single command creation
62 headers: {
35 : `applications/${DISCORD_APP_ID}/commands`;
36
37 console.log(`📡 Using API endpoint: ${endpoint}`);
38
39 try {
41 console.log("🔍 Checking current commands...");
42
43 const getResponse = await fetch(`https://discord.com/api/v10/${endpoint}`, {
44 method: "GET",
45 headers: {
62
63 // Send empty array to unregister all commands
64 const response = await fetch(`https://discord.com/api/v10/${endpoint}`, {
65 method: "PUT",
66 headers: {

TownieREADME.md12 matches

@valdottownUpdated 1 week ago
9- **File Browser**: Select specific files to include in the context window for more focused AI assistance
10- **Branch Management**: View, select, and create branches without leaving the app
11- **Cost Tracking**: See estimated API usage costs for each interaction
12- **Sound Notifications**: Get alerted when Claude finishes responding
13- **Mobile-Friendly**: Works on both desktop and mobile devices
14- **Usage Dashboard**: Monitor API usage and inference calls with detailed analytics
15
16## How It Works
17
181. **Login**: Authenticate with your Val Town API token and Anthropic API key
192. **Select a Project**: Choose which Val Town project you want to work on
203. **Select Files**: Browse your project files and select which ones to include in the context window
26### Prerequisites
27
28- A Val Town account with API access
29- An Anthropic API key (Claude 3.7 Sonnet)
30
31### Setup
32
331. Visit the OpenTownie app
342. Enter your Val Town API token (with `projects:write` and `users:read` permissions)
353. Enter your Anthropic API key
364. Click "Login" to access your projects
37
49- React frontend with TypeScript
50- React Router
51- Hono API server backend
52- Web Audio API for sound notifications
53- AI SDK for Claude integration
54
55The application proxies requests to the Anthropic API and Val Town API, allowing Claude to view and edit your project files directly.
56
57## Privacy & Security
58
59- Your Val Town API token and Anthropic API key are stored locally in your browser
60- No data is stored on our servers
61- All communication with the APIs is done directly from your browser
62

Townieschema.tsx2 matches

@valdottownUpdated 1 week ago
19 finish_reason?: string;
20 num_images?: number;
21 our_api_token: boolean;
22}
23
44 finish_reason TEXT,
45 num_images INTEGER,
46 our_api_token INTEGER NOT NULL,
47 finish_timestamp INTEGER
48 )

Townieuser-summary.ts1 match

@valdottownUpdated 1 week ago
20 SUM(num_images) as total_images
21 FROM ${USAGE_TABLE}
22 WHERE our_api_token = 1
23 GROUP BY user_id, username
24 ORDER BY total_price DESC

Townierequests.ts4 matches

@valdottownUpdated 1 week ago
17 finish_reason: string | null;
18 num_images: number | null;
19 our_api_token: number;
20}
21
57
58 // Fetch the inference calls data
59 fetch('/api/inference-calls?usage_id=' + usageId)
60 .then(response => response.json())
61 .then(data => {
192 <th>Finish</th>
193 <th>Images</th>
194 <th>Our API</th>
195 </tr>
196 </thead>
216 <td>${row.finish_reason || '-'}</td>
217 <td>${formatNumber(row.num_images)}</td>
218 <td>${formatBoolean(row.our_api_token)}</td>
219 </tr>
220 `).join("")}

TownieREADME.md12 matches

@valdottownUpdated 1 week ago
1# Usage Dashboard
2
3A dashboard for monitoring API usage and inference calls.
4
5## Features
20 index.ts # Main entry point and routing
21 auth.ts # Authentication logic
22 /api/
23 index.ts # API request handler
24 requests.ts # API endpoints for requests data
25 inference-calls.ts # API endpoints for inference calls
26 user-summary.ts # API endpoints for user summary data
27 /views/
28 layout.ts # Common layout template
54 - Links back to the associated request
55
56### API Endpoints
57
58- `/api/requests` - Get paginated requests
59- `/api/requests?usage_id=123` - Get a specific request
60- `/api/inference-calls` - Get paginated inference calls
61- `/api/inference-calls?usage_id=123` - Get inference calls for a specific request
62- `/api/user-summary` - Get user summary data
63
64## Debugging

vapi-minutes-db2 file matches

@henrywilliamsUpdated 11 hours ago

social_data_api_project3 file matches

@tsuchi_yaUpdated 3 days ago
papimark21
socialdata
Affordable & reliable alternative to Twitter API: ➡️ Access user profiles, tweets, followers & timeline data in real-time ➡️ Monitor profiles with nearly instant alerts for new tweets, follows & profile updates ➡️ Simple integration