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/?q=api&page=511&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 10967 results for "api"(686ms)

cerebras_codermain.tsx5 matches

@aabidfarooq•Updated 2 months ago
212 } catch (error) {
213 Toastify({
214 text: "We may have hit our Cerebras Usage limits. Try again later or fork this and use your own API key.",
215 position: "center",
216 duration: 3000,
1024 };
1025 } else {
1026 const client = new Cerebras({ apiKey: Deno.env.get("CEREBRAS_API_KEY") });
1027 const completion = await client.chat.completions.create({
1028 messages: [
1149 <meta name="viewport" content="width=device-width, initial-scale=1.0">
1150 <title>CerebrasCoder</title>
1151 <link rel="preconnect" href="https://fonts.googleapis.com" />
1152 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1153 <link
1154 href="https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap"
1155 rel="stylesheet"
1156 />
1165 <meta property="og:description" content="Turn your ideas into fully functional apps in less than a second – powered by Llama3.3-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
1166 <meta property="og:type" content="website">
1167 <meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
1168
1169

cerebras_coder_migratedREADME.md2 matches

@roadlabs•Updated 2 months ago
6
71. Sign up for [Cerebras](https://cloud.cerebras.ai/)
82. Get a Cerebras API Key
93. Save it in a [Val Town environment variable](https://www.val.town/settings/environment-variables) called `CEREBRAS_API_KEY`

cerebras_coder_migratedmain.tsx5 matches

@roadlabs•Updated 2 months ago
212 } catch (error) {
213 Toastify({
214 text: "We may have hit our Cerebras Usage limits. Try again later or fork this and use your own API key.",
215 position: "center",
216 duration: 3000,
1024 };
1025 } else {
1026 const client = new Cerebras({ apiKey: Deno.env.get("CEREBRAS_API_KEY") });
1027 const completion = await client.chat.completions.create({
1028 messages: [
1149 <meta name="viewport" content="width=device-width, initial-scale=1.0">
1150 <title>CerebrasCoder</title>
1151 <link rel="preconnect" href="https://fonts.googleapis.com" />
1152 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1153 <link
1154 href="https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap"
1155 rel="stylesheet"
1156 />
1165 <meta property="og:description" content="Turn your ideas into fully functional apps in less than a second – powered by Llama3.3-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
1166 <meta property="og:type" content="website">
1167 <meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
1168
1169

joyfulPeachPumastylishIndigoGibbon2 matches

@charmaine•Updated 2 months ago
1Deno.env.get(VAL_TOWN_API_KEY);
2
3console.log(VAL_TOWN_API_KEY);

tsEvaltsEval2 matches

@maxm•Updated 2 months ago
16 return c.text("Invalid form submission, missing 'code'", 400);
17 }
18 let apiKey = form.get("key") as string;
19 // TODO: remove this once we have import maps working
20 code = code.replaceAll(`from "@valtown/sdk"`, `from "npm:@valtown/sdk"`);
22 const body = new ReadableStream({
23 async start(controller) {
24 worker = newWorker({ code, env: { ...(apiKey ? { VAL_TOWN_API_KEY: apiKey } : {}) } });
25 await new Promise<void>((resolve, reject) => {
26 (worker as Worker).onmessage = (e) => {

SideProjectSaturdayemail.ts1 match

@justbe•Updated 2 months ago
1import { Resend } from "resend";
2
3const resend = new Resend(Deno.env.get("RESEND_API_KEY"));
4
5// resend.emails.send({

valentines_day_card_generatorfrontend_card4 matches

@charmaine•Updated 2 months ago
10// mock data
11const IMAGE_URLS = [
12 "https://charmaine-blob_admin.web.val.run/api/public/public%2F1738957396306_pngtree-valentine-day-gift-box-open-love-heart-and-rose-potale-greeting-png-image_6564851.png",
13 "https://charmaine-blob_admin.web.val.run/api/public/public%2F1738959510139_2020-heart-pounding-animation.gif",
14 "https://charmaine-blob_admin.web.val.run/api/public/public%2F1738959545863_sugary-heart-valentine-png-5692911.png",
15 "https://charmaine-blob_admin.web.val.run/api/public/public%2F1738957543311_Red_Happy_Valentine's_Day_PNG_Clip-Art_Image.png",
16];
17

tsEvalindexPage1 match

@maxm•Updated 2 months ago
49 />
50 <div>
51 <input type="text" id="key" name="key" placeholder="API KEY" />
52 </div>
53 <button id="submit" type="submit">Submit</button>

valentines_day_card_generatorget-images1 match

@charmaine•Updated 2 months ago
26 for (const row of result.rows) {
27 const blobPath = await blob.get(row["path"] as string);
28 images.push(`https://shouser-blob_admin.web.val.run/api/public/${blobPath.url}`);
29 }
30

valentines_day_card_generatorREADME.md1 match

@charmaine•Updated 2 months ago
3hi sophieee
4
5ok so i only edited `frontend_card`, you can see where im directly grabbing a public url i have in my blob storage aka: https://charmaine-blob_admin.web.val.run/api/public/public%2F1738957543311_Red_Happy_Valentine's_Day_PNG_Clip-Art_Image.png
6
7i would love to be able to make get requests to a url like that instead of hard coding them :p

daily-advice-app1 file match

@dcm31•Updated 1 day ago
Random advice app using Advice Slip API

gptApiTemplate1 file match

@charmaine•Updated 3 days ago
apiv1
papimark21