blob_adminREADME.md1 match
9[](https://www.val.town/v/stevekrouse/blob_admin_app/fork)
1011It 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).
1213# TODO
free_open_routermain.tsx16 matches
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";
56const isValTown = Deno.env.get("VALTOWN_API_URL");
7// Define a common set of CORS headers
8const corsHeaders = {
148}
149150// Define the API endpoints and their respective tokens
151const apiEndpoints = [
152{
153url: "https://openrouter.ai/api/v1/models",
154token: Deno.env.get("OPEN_ROUTER_API_KEY"),
155},
156{
157url: "https://api.groq.com/openai/v1/models",
158token: Deno.env.get("GROQ_API_KEY"),
159},
160];
161162// Create fetch promises for each API endpoint
163const fetchPromises = apiEndpoints.map(({ url, token }) =>
164fetch(url, {
165headers: {
262}
263264let bearerToken = Deno.env.get("OPEN_ROUTER_API_KEY");
265266let body: string | ReadableStream<Uint8Array> | null = null;
277provider = "groq";
278model = model.replace("groq/", "");
279bearerToken = Deno.env.get("GROQ_API_KEY");
280}
281// Check if model ends with ':free'
297298if (provider === "groq") {
299url.host = "api.groq.com";
300url.pathname = url.pathname.replace("/api/v1", "/openai/v1");
301url.port = "443";
302url.protocol = "https";
318};
319320// Special handling for /api/v1/models
321if (url.pathname == MODELS) {
322return new Response(JSON.stringify({ object: "list", data: freeModels }), {
celinewaitlistmain.tsx1 match
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
9type Y = Ex<1 | 2 | 3 | "a" | "b" | "c", "a" | "c">;
1011type T = Capitalize<"asdf">;
1213type TT = Uncapitalize<"AAA">;
1415//
axiomNotifierREADME.md1 match
1This webhook handler sends messages in the specificed thread in response to events from [Axiom](https://axiom.co), a log monitoring service,
23Campsite API Documentation: https://campsite.com/docs
openapi_playgroundmain.tsx4 matches
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);
64return (
65<Layout title="OpenAPI Playground">
66<style>
67{String.raw`
231}
232} else {
233code = `# Paste your OpenAPI spec here`;
234}
235}
238});
239function template(code: string) {
240return `import { makeServer } from "https://esm.town/v/stainless_em/openapiPlaygroundServer"\nexport default makeServer(${
241JSON.stringify(YAML.parse(code))
242})`;
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});
29const start = performance.now();
30const res = await fetch(API_URL + "/v1/eval", {
31method: "POST",
32body: JSON.stringify({
48privacy: "unlisted",
49});
50await fetch("https://www.val.town/api/trpc/updateVal", {
51headers: {
52"content-type": "application/json",
openapi_playgroundREADME.md2 matches
1# openapi playground
2temporarily host swagger and prism for your openapi spec
primeTurquoiseTernREADME.md1 match
891. 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