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/$%7Bart_info.art.src%7D?q=api&page=919&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 12831 results for "api"(4345ms)

blob_adminREADME.md1 match

@sammeltassen•Updated 8 months ago
9[![](https://stevekrouse-button.express.val.run/Install)](https://www.val.town/v/stevekrouse/blob_admin_app/fork)
10
11It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).
12
13# TODO

free_open_routermain.tsx16 matches

@taras•Updated 8 months ago
1const COMPLETION = "/api/v1/chat/completions";
2const MODELS = "/api/v1/models";
3const supported_urls = [COMPLETION, MODELS];
4import { blob } from "https://esm.town/v/std/blob";
5
6const isValTown = Deno.env.get("VALTOWN_API_URL");
7// Define a common set of CORS headers
8const corsHeaders = {
148 }
149
150 // Define the API endpoints and their respective tokens
151 const apiEndpoints = [
152 {
153 url: "https://openrouter.ai/api/v1/models",
154 token: Deno.env.get("OPEN_ROUTER_API_KEY"),
155 },
156 {
157 url: "https://api.groq.com/openai/v1/models",
158 token: Deno.env.get("GROQ_API_KEY"),
159 },
160 ];
161
162 // Create fetch promises for each API endpoint
163 const fetchPromises = apiEndpoints.map(({ url, token }) =>
164 fetch(url, {
165 headers: {
262 }
263
264 let bearerToken = Deno.env.get("OPEN_ROUTER_API_KEY");
265
266 let body: string | ReadableStream<Uint8Array> | null = null;
277 provider = "groq";
278 model = model.replace("groq/", "");
279 bearerToken = Deno.env.get("GROQ_API_KEY");
280 }
281 // Check if model ends with ':free'
297
298 if (provider === "groq") {
299 url.host = "api.groq.com";
300 url.pathname = url.pathname.replace("/api/v1", "/openai/v1");
301 url.port = "443";
302 url.protocol = "https";
318 };
319
320 // Special handling for /api/v1/models
321 if (url.pathname == MODELS) {
322 return new Response(JSON.stringify({ object: "list", data: freeModels }), {

celinewaitlistmain.tsx1 match

@mbo•Updated 8 months ago
1/**
2 * This Val creates a simple API endpoint that saves an email address for notifications
3 * using Val Town's JSON storage. It handles POST requests to save the submitted email
4 * and returns a simple confirmation message.

wed18_09_2024main.tsx2 matches

@hideokun•Updated 8 months ago
9type Y = Ex<1 | 2 | 3 | "a" | "b" | "c", "a" | "c">;
10
11type T = Capitalize<"asdf">;
12
13type TT = Uncapitalize<"AAA">;
14
15//

axiomNotifierREADME.md1 match

@campsite•Updated 8 months ago
1This webhook handler sends messages in the specificed thread in response to events from [Axiom](https://axiom.co), a log monitoring service,
2
3Campsite API Documentation: https://campsite.com/docs

openapi_playgroundmain.tsx4 matches

@stainless_em•Updated 8 months ago
10} from "https://deno.land/x/hono@v4.0.10/jsx/index.ts";
11import { Hono } from "https://deno.land/x/hono@v4.0.10/mod.ts";
12import { API_URL } from "https://esm.town/v/std/API_URL?v=5";
13import { create } from "https://esm.town/v/websandbox/create";
14import * as YAML from "jsr:@std/yaml";
63 );
64 return (
65 <Layout title="OpenAPI Playground">
66 <style>
67 {String.raw`
231 }
232 } else {
233 code = `# Paste your OpenAPI spec here`;
234 }
235 }
238});
239function template(code: string) {
240 return `import { makeServer } from "https://esm.town/v/stainless_em/openapiPlaygroundServer"\nexport default makeServer(${
241 JSON.stringify(YAML.parse(code))
242 })`;

runmain.tsx2 matches

@websandbox•Updated 8 months ago
1import { getMainExport } from "https://esm.town/v/easrng/oldstyleUtil?v=1";
2import { API_URL } from "https://esm.town/v/std/API_URL?v=5";
3import { blob } from "https://esm.town/v/std/blob?v=11";
4import { decodeBase64, encodeBase64 } from "jsr:@std/encoding@0.219.1/base64";
28 });
29 const start = performance.now();
30 const res = await fetch(API_URL + "/v1/eval", {
31 method: "POST",
32 body: JSON.stringify({

createAPImain.tsx1 match

@websandbox•Updated 8 months ago
48 privacy: "unlisted",
49 });
50 await fetch("https://www.val.town/api/trpc/updateVal", {
51 headers: {
52 "content-type": "application/json",

openapi_playgroundREADME.md2 matches

@stainless_em•Updated 8 months ago
1# openapi playground
2temporarily host swagger and prism for your openapi spec

primeTurquoiseTernREADME.md1 match

@phyllislim•Updated 8 months ago
8
91. Click `Fork`
102. Change `location` (Line 4) to describe your location. It accepts fairly flexible English descriptions which it turns into locations via [nominatim's geocoder API](https://www.val.town/v/stevekrouse/nominatimSearch).
113. Click `Run`
12

vapi-minutes-db1 file match

@henrywilliams•Updated 1 day ago

vapi-minutes-db2 file matches

@henrywilliams•Updated 1 day ago
mux
Your friendly, neighborhood video API.
api