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=504&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 6292 results for "api"(590ms)

blob_adminREADME.md1 match

@jasonleefrenchโ€ขUpdated 5 months ago
11[![](https://stevekrouse-button.web.val.run/Install)](https://www.val.town/v/stevekrouse/blob_admin_app/fork)
12
13It 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).
14
15# TODO

StripeCheckoutDemomain.tsx2 matches

@vawogbemiโ€ขUpdated 5 months ago
425 if (url.pathname === "/create-checkout-session" && req.method === "POST") {
426 const stripe = new Stripe(Deno.env.get("STRIPE_SECRET_KEY"), {
427 apiVersion: "2022-11-15",
428 });
429
464
465 const stripe = new Stripe(Deno.env.get("STRIPE_SECRET_KEY"), {
466 apiVersion: "2022-11-15",
467 });
468

jokeGeneratorValmain.tsx1 match

@naomizhangโ€ขUpdated 5 months ago
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();

boldRoseWaspREADME.md1 match

@parkerdavisโ€ขUpdated 5 months ago
9To use it on your own Val Town SQLite database, [fork it](https://www.val.town/v/stevekrouse/sqlite_admin/fork) to your account.
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).

codecommenterREADME.md3 matches

@JamesAndrewโ€ขUpdated 5 months ago
162. The user selects the appropriate language from the dropdown menu
173. When the "Add Comments" button is clicked, the code is sent to the server
184. The server uses OpenAI's API to generate comments for the code
195. The commented code is returned and displayed in the right panel with syntax highlighting
20
28- Deno: Runtime environment
29- Val Town: Hosting platform
30- OpenAI API: For generating code comments
31
32## Usage
41## Limitations
42
43- The maximum length of code that can be processed is limited by the OpenAI API's token limit
44- The quality of comments may vary depending on the complexity of the code and the AI model's capabilities
45- Internet connection is required to use the application

aqiREADME.md1 match

@davidhaririโ€ขUpdated 5 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

passionateScarletPrawnmain.tsx7 matches

@stevekrouseโ€ขUpdated 5 months ago
123 }
124
125 const REPLICATE_API_KEY = Deno.env.get("REPLICATE_API_KEY");
126
127 if (REPLICATE_API_KEY) {
128 const modelVersion = useProModel ? "black-forest-labs/flux-1.1-pro" : "black-forest-labs/flux-schnell";
129 const settings = {
130 outputFormat: "jpg",
131 outputQuality: 90,
132 megapixels: "1",
133 };
134
135 console.log("Sending initial request to Replicate...");
136 const response = await fetch(`https://api.replicate.com/v1/models/${modelVersion}/predictions`, {
137 method: "POST",
138 headers: {
139 "Content-Type": "application/json",
140 "Authorization": `Bearer ${REPLICATE_API_KEY}`,
141 },
142 body: JSON.stringify({
146 output_quality: settings.outputQuality,
147 disable_safety_checker: true,
148 megapixels: settings.megapixels,
149 },
150 }),
159 const resultResponse = await fetch(prediction.urls.get, {
160 headers: {
161 "Authorization": `Token ${REPLICATE_API_KEY}`,
162 },
163 });

passionateScarletPrawnREADME.md1 match

@stevekrouseโ€ขUpdated 5 months ago
1๐Ÿ‘• **Shirtgen API Endpoint**
2
3Shirtgen lets you generate AI-powered t-shirt designs with just a prompt! ๐Ÿ–‹๏ธ Choose between the standard "Flux Schnell" model or the enhanced "Pro" model. Perfect for creating unique custom apparel in seconds! ๐Ÿš€

laudableFuchsiaMastodonmain.tsx7 matches

@stevekrouseโ€ขUpdated 5 months ago
91 }
92
93 const REPLICATE_API_KEY = Deno.env.get("REPLICATE_API_KEY");
94
95 if (REPLICATE_API_KEY) {
96 const modelVersion = useProModel ? "black-forest-labs/flux-1.1-pro" : "black-forest-labs/flux-schnell";
97 const settings = {
98 outputFormat: "jpg",
99 outputQuality: 90,
100 megapixels: "1",
101 };
102
103 console.log("Sending initial request to Replicate...");
104 const response = await fetch(`https://api.replicate.com/v1/models/${modelVersion}/predictions`, {
105 method: "POST",
106 headers: {
107 "Content-Type": "application/json",
108 "Authorization": `Bearer ${REPLICATE_API_KEY}`,
109 },
110 body: JSON.stringify({
114 output_quality: settings.outputQuality,
115 disable_safety_checker: true,
116 megapixels: settings.megapixels,
117 },
118 }),
127 const resultResponse = await fetch(prediction.urls.get, {
128 headers: {
129 "Authorization": `Token ${REPLICATE_API_KEY}`,
130 },
131 });

laudableFuchsiaMastodonREADME.md1 match

@stevekrouseโ€ขUpdated 5 months ago
1๐Ÿ‘• **Shirtgen API Endpoint**
2
3Shirtgen lets you generate AI-powered t-shirt designs with just a prompt! ๐Ÿ–‹๏ธ Choose between the standard "Flux Schnell" model or the enhanced "Pro" model. Perfect for creating unique custom apparel in seconds! ๐Ÿš€

daily-advice-app1 file match

@dcm31โ€ขUpdated 8 hours ago
Random advice app using Advice Slip API

runValAPIEx2 file matches

@charmaineโ€ขUpdated 1 day ago
rapilot330
YoungPapi