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=533&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 10642 results for "api"(1570ms)

cerebrasTemplateREADME.md6 matches

@keien•Updated 3 months ago
22
231. Sign up for [Cerebras](https://cloud.cerebras.ai/)
242. Get a Cerebras API Key
253. Save it in a [Val Town environment variable](https://www.val.town/settings/environment-variables) called `CEREBRAS_API_KEY`
26
27Once Cerebras is set up in your Val Town account, there are two ways to get started:
37const { OpenAI } = await import("https://esm.sh/openai");
38const client = new OpenAI({
39 apiKey: Deno.env.get("CEREBRAS_API_KEY"),
40 baseURL: "https://api.cerebras.ai/v1"
41});
42const response = await client.chat.completions.create({
54## Sample apps
55
56* **[Cerebras Searcher](https://www.val.town/v/stevekrouse/cerebras_searcher)** - a Perplexity clone that uses the SerpAPI to do RAG
57and summaries with Cerebras (*requires a SerpAPI key*)
58* **[Cerebras Coder](https://www.val.town/v/stevekrouse/cerebras_coder)** - an app that
59generates websites in a second with Cerebras

cerebrasTemplatemain.tsx5 matches

@keien•Updated 3 months ago
88 // Keep these comments so we remember not to change this
89 const client = new OpenAI({
90 apiKey: Deno.env.get("CEREBRAS_API_KEY"),
91 baseURL: "https://api.cerebras.ai/v1",
92 });
93
101 return Response.json({ message: generatedMessage });
102 } catch (error) {
103 console.error("Error calling Cerebras API:", error);
104
105 if (error.status === 429) {
106 return Response.json({ error: "Cerebras API rate limit reached. Please try again later." }, { status: 429 });
107 } else {
108 return Response.json({ error: `API Error: ${error.message}` }, { status: 500 });
109 }
110 }

cerebrasTemplatemain.tsx5 matches

@cory16457•Updated 3 months ago
88 // Keep these comments so we remember not to change this
89 const client = new OpenAI({
90 apiKey: Deno.env.get("csk-n552ehwetvcnykdcwc3wyffn33kw8yfcwddj6vw9cdvyxkpr"),
91 baseURL: "https://api.cerebras.ai/v1",
92 });
93
101 return Response.json({ message: generatedMessage });
102 } catch (error) {
103 console.error("Error calling Cerebras API:", error);
104
105 if (error.status === 429) {
106 return Response.json({ error: "Cerebras API rate limit reached. Please try again later." }, { status: 429 });
107 } else {
108 return Response.json({ error: `API Error: ${error.message}` }, { status: 500 });
109 }
110 }

cerebrasTemplateREADME.md6 matches

@cory16457•Updated 3 months ago
22
231. Sign up for [Cerebras](https://cloud.cerebras.ai/)
242. Get a Cerebras API Key
253. Save it in a [Val Town environment variable](https://www.val.town/settings/environment-variables) called `CEREBRAS_API_KEY`
26
27Once Cerebras is set up in your Val Town account, there are two ways to get started:
37const { OpenAI } = await import("https://esm.sh/openai");
38const client = new OpenAI({
39 apiKey: Deno.env.get("CEREBRAS_API_KEY"),
40 baseURL: "https://api.cerebras.ai/v1"
41});
42const response = await client.chat.completions.create({
54## Sample apps
55
56* **[Cerebras Searcher](https://www.val.town/v/stevekrouse/cerebras_searcher)** - a Perplexity clone that uses the SerpAPI to do RAG
57and summaries with Cerebras (*requires a SerpAPI key*)
58* **[Cerebras Coder](https://www.val.town/v/stevekrouse/cerebras_coder)** - an app that
59generates websites in a second with Cerebras

hopefulGoldChinchillaREADME.md2 matches

@charmaine•Updated 3 months ago
8
91. Sign up for [Cerebras](https://cloud.cerebras.ai/)
102. Get a Cerebras API Key
113. Save it in a [Val Town environment variable](https://www.val.town/settings/environment-variables) called `CEREBRAS_API_KEY`

hopefulGoldChinchillamain.tsx5 matches

@charmaine•Updated 3 months ago
264 } catch (error) {
265 Toastify({
266 text: "We may have hit our Cerebras Usage limits. Try again later or fork this and use your own API key.",
267 position: "center",
268 duration: 3000,
1044 };
1045 } else {
1046 const client = new Cerebras({ apiKey: Deno.env.get("CEREBRAS_API_KEY") });
1047 const completion = await client.chat.completions.create({
1048 messages: [
1169 <meta name="viewport" content="width=device-width, initial-scale=1.0">
1170 <title>CerebrasCoder</title>
1171 <link rel="preconnect" href="https://fonts.googleapis.com" />
1172 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1173 <link
1174 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"
1175 rel="stylesheet"
1176 />
1185 <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."">
1186 <meta property="og:type" content="website">
1187 <meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
1188
1189

aqiREADME.md1 match

@siddharth178•Updated 3 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

cerebras_coderREADME.md2 matches

@harrythedevopsguy•Updated 3 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_codermain.tsx5 matches

@harrythedevopsguy•Updated 3 months ago
217 } catch (error) {
218 Toastify({
219 text: "We may have hit our Cerebras Usage limits. Try again later or fork this and use your own API key.",
220 position: "center",
221 duration: 3000,
970 };
971 } else {
972 const client = new Cerebras({ apiKey: Deno.env.get("CEREBRAS_API_KEY") });
973 const completion = await client.chat.completions.create({
974 messages: [
1095 <meta name="viewport" content="width=device-width, initial-scale=1.0">
1096 <title>CerebrasCoder</title>
1097 <link rel="preconnect" href="https://fonts.googleapis.com" />
1098 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1099 <link
1100 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"
1101 rel="stylesheet"
1102 />
1111 <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."">
1112 <meta property="og:type" content="website">
1113 <meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
1114
1115

newFavoriteSongBotmain.tsx1 match

@alexwein•Updated 3 months ago
1import process from "node:process";
2import { AppBskyFeedPost, AtpAgent } from "npm:@atproto/api";
3
4import getSpotifyAccessToken from "https://esm.town/v/alexwein/getSpotifyAccessToken";

daily-advice-app1 file match

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

gptApiTemplate1 file match

@charmaine•Updated 2 days ago
apiv1
papimark21