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?q=api&page=121&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 20871 results for "api"(2242ms)

Townieuser-summary.ts2 matches

@ianmenethil•Updated 2 weeks ago
20 SUM(num_images) as total_images
21 FROM ${USAGE_TABLE}
22 WHERE our_api_token = 1
23 `;
24
41 FROM ${INFERENCE_CALLS_TABLE} i
42 JOIN ${USAGE_TABLE} u ON i.usage_id = u.id
43 WHERE u.our_api_token = 1
44 `;
45

Townieuser-detail.ts2 matches

@ianmenethil•Updated 2 weeks ago
1import { renderLayout } from "./layout.ts";
2import { formatNumber, formatPrice, formatDate, formatBoolean } from "../utils/formatters.ts";
3import { CreditAddition } from "../api/credit-additions.ts";
4
5interface UserSummaryRow {
33 finish_reason?: string;
34 num_images?: number;
35 our_api_token: boolean;
36}
37

TownieuseProject.tsx2 matches

@ianmenethil•Updated 2 weeks ago
1import { useState, useEffect } from "react";
2
3const PROJECT_ENDPOINT = "/api/project";
4const FILES_ENDPOINT = "/api/project-files";
5
6export function useProject(projectId: string, branchId?: string) {

TownieuseProjects.tsx1 match

@ianmenethil•Updated 2 weeks ago
1import { useState, useEffect } from "react";
2
3const ENDPOINT = "/api/projects-loader";
4
5export function useProjects() {

TownieuseCreditBalance.tsx1 match

@ianmenethil•Updated 2 weeks ago
8 const fetchBalance = async () => {
9 try {
10 const response = await fetch("/api/credit-balance");
11 if (response.ok) {
12 const data = await response.json();

TownieuseCreateProject.tsx1 match

@ianmenethil•Updated 2 weeks ago
1import { useState, useEffect } from "react";
2
3const ENDPOINT = "/api/create-project";
4
5export function useCreateProject() {

TownieuseCreateBranch.tsx1 match

@ianmenethil•Updated 2 weeks ago
1import { useState, useEffect } from "react";
2
3const ENDPOINT = "/api/create-branch";
4
5export function useCreateBranch(projectId: string) {

TownieuseChatLogic.ts2 matches

@ianmenethil•Updated 2 weeks ago
17 project,
18 branchId,
19 // anthropicApiKey,
20 // bearerToken,
21 selectedFiles,
39 status,
40 } = useChat({
41 api: "/api/send-message",
42 body: {
43 project,

TownieuseBranches.tsx1 match

@ianmenethil•Updated 2 weeks ago
1import { useState, useEffect } from "react";
2
3const ENDPOINT = "/api/project-branches";
4
5export function useBranches (projectId: string) {

Townieusage-detail.ts2 matches

@ianmenethil•Updated 2 weeks ago
18 finish_reason?: string;
19 num_images?: number;
20 our_api_token: boolean;
21}
22
129 </div>
130 <div class="card-item">
131 <strong>Our API:</strong> ${formatBoolean(usage.our_api_token)}
132 </div>
133 </div>

groqTTSDebugger1 file match

@dcm31•Updated 1 day ago
Simple Groq TTS API tester for Arduino debugging

claude-api1 file match

@ziyanwould•Updated 5 days ago
replicate
Run AI with an API
fiberplane
Purveyors of Hono tooling, API Playground enthusiasts, and creators of 🪿 HONC 🪿 (https://honc.dev)