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/image-url.jpg%20%22Optional%20title%22?q=api&page=1389&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 17903 results for "api"(3668ms)

sqliteExplorerAppmain.tsx2 matches

@sammeltassenโ€ขUpdated 6 months ago
27 <head>
28 <title>SQLite Explorer</title>
29 <link rel="preconnect" href="https://fonts.googleapis.com" />
30
31 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
32 <link
33 href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap"
34 rel="stylesheet"
35 />

rumsey_rouletteREADME.md1 match

@sammeltassenโ€ขUpdated 6 months ago
1# Rumsey Roulette
2
3This val returns a random [Georeference Annotation](https://iiif.io/api/extension/georef/) from the [David Rumsey Map Collection](https://www.davidrumsey.com/).
4
5More information about the source data can be found [here](https://github.com/allmaps/rumsey-scripts/).

aqiREADME.md1 match

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

obedientHarlequinHedgehogmain.tsx1 match

@taurusismagicโ€ขUpdated 6 months ago
307 <meta name="viewport" content="width=device-width, initial-scale=1.0">
308 <title>BestTime2Post</title>
309 <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
310 <style>${css}</style>
311 </head>

sqlitemain.tsx4 matches

@crazytownโ€ขUpdated 6 months ago
1import { API_URL } from "https://esm.town/v/std/API_URL";
2import { LibsqlError, type ResultSet, type Row, type TransactionMode } from "npm:@libsql/client";
3import { z } from "npm:zod";
35
36async function execute(statement: InStatement, args?: InArgs): Promise<ResultSet> {
37 const res = await fetch(`${API_URL}/v1/sqlite/execute`, {
38 method: "POST",
39 headers: {
50
51async function batch(statements: InStatement[], mode?: TransactionMode): Promise<ResultSet[]> {
52 const res = await fetch(`${API_URL}/v1/sqlite/batch`, {
53 method: "POST",
54 headers: {
78
79/* Val Town's Turso Proxy returns rows as an array of values
80 * Yet the LibSQL API has a Row type which behave as an array or object,
81 * ie you can access it via numerical index or string
82 */

passionateScarletPrawnmain.tsx7 matches

@stevekrouseโ€ขUpdated 6 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 6 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 6 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 6 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! ๐Ÿš€

shirtGenScriptREADME.md1 match

@stevekrouseโ€ขUpdated 6 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! ๐Ÿš€

dailyQuoteAPI

@Soukyโ€ขUpdated 1 day ago

HTTP

@Ncharityโ€ขUpdated 1 day ago
Daily Quote API
apiry
Kapil01