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/$%7Burl%7D?q=image&page=1&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=image

Returns an array of strings in format "username" or "username/projectName"

Found 6332 results for "image"(713ms)

testPondiversegetCreationImage1 match

@argmn•Updated 54 mins ago
9 let response;
10 try {
11 response = await blob.get("pondiverse_image" + id);
12 } catch (e) {
13 return new Response(null, { status: 404 });

testPondiverseaddCreation11 matches

@argmn•Updated 56 mins ago
9 // - data (string)
10 // - type (string)
11 // - image (data url string)
12 // sanity checks:
13 // - title, not toooo long
14 // - data, hmm this needs to be long i guess.. maybe some crazy upper limit sanity check though
15 // - type, not too long
16 // - image, not toooo large a file size
17 let body;
18 try {
25 const data = body.data;
26 const type = body.type;
27 const image = body.image;
28
29 // Sanity checks
37 }
38
39 if (image && image.length > 20 * 1024 * 1024) {
40 return Response.json({ ok: false, error: "Thumbnail too large" });
41 }
57 );
58
59 // only creates blob if there is indeed an image and updates the image column to represent that
60 if (image) {
61 const imageName = "pondiverse_image" + id.lastInsertRowid;
62 const imageAddr = `${Deno.env.get("PONDIVERSE_STORE_BASE_PATH")}/get-creation-image?id=${id.lastInsertRowid}`;
63 await blob.set(imageName, image);
64 await sqlite.execute(
65 `UPDATE ${TABLE_NAME} SET image = "${imageAddr}" WHERE id = ${id.lastInsertRowid}`,
66 );
67 }
68
69 return Response.json({ ok: true, image: image });
70}

testPondiversemain3 matches

@argmn•Updated 1 hour ago
2import deleteCreation from "./deleteCreation";
3import getCreation from "./getCreation";
4import getCreationImage from "./getCreationImage";
5import getCreations from "./getCreations";
6import updateTable from "./updateTable";
15 case "/get-creation":
16 return getCreation(req);
17 case "/get-creation-image":
18 return getCreationImage(req);
19 case "/get-creations":
20 return getCreations(req);

testPondiverseupdateTable1 match

@argmn•Updated 2 hours ago
21 data TEXT,
22 type TEXT,
23 image TEXT,
24 time DATETIME NOT NULL
25 )`,

Towniesend-message.ts12 matches

@valdottown•Updated 3 hours ago
20 }
21
22 const { messages, project, branchId, anthropicApiKey, selectedFiles, images } = await c.req.json();
23 // console.log("Original messages:", JSON.stringify(messages, null, 2));
24 // console.log("Images received:", JSON.stringify(images, null, 2));
25
26 const apiKey = anthropicApiKey || Deno.env.get("ANTHROPIC_API_KEY");
39 let coreMessages = convertToCoreMessages(messages);
40
41 // If there are images, we need to add them to the last user message
42 if (images && Array.isArray(images) && images.length > 0) {
43 // Find the last user message
44 const lastUserMessageIndex = coreMessages.findIndex(
62 };
63
64 // Add each image to the content array using the correct ImagePart format
65 for (const image of images) {
66 if (image && image.url) {
67 // Extract mime type from data URL if available
68 let mimeType = undefined;
69 if (image.url.startsWith("data:")) {
70 const matches = image.url.match(/^data:([^;]+);/);
71 if (matches && matches.length > 1) {
72 mimeType = matches[1];
75
76 newUserMessage.content.push({
77 type: "image",
78 image: image.url,
79 mimeType,
80 });
163 branch_id: branchId,
164 val_id: project.id,
165 num_images: images?.length || 0,
166 model,
167 finish_reason: result.finishReason,

Townieusage-dashboard.ts5 matches

@valdottown•Updated 3 hours ago
74 SUM(cache_write_tokens) as total_cache_write_tokens,
75 SUM(price) as total_price,
76 SUM(num_images) as total_images
77 FROM ${USAGE_TABLE}
78 WHERE our_api_token = 1
207 <th>Cache Write</th>
208 <th>Total Price</th>
209 <th>Images</th>
210 </tr>
211 </thead>
222 <td>${formatNumber(row.total_cache_write_tokens)}</td>
223 <td class="price">${formatPrice(row.total_price)}</td>
224 <td>${formatNumber(row.total_images)}</td>
225 </tr>
226 `).join("")
255 <th>Price</th>
256 <th>Finish</th>
257 <th>Images</th>
258 <th>Our API</th>
259 </tr>
275 <td class="price">${formatPrice(row.price)}</td>
276 <td>${row.finish_reason}</td>
277 <td>${formatNumber(row.num_images)}</td>
278 <td>${formatBoolean(row.our_api_token)}</td>
279 </tr>

Townieschema.tsx2 matches

@valdottown•Updated 3 hours ago
16 price: number;
17 finish_reason: string;
18 num_images: number;
19 our_api_token: boolean;
20}
36 price REAL,
37 finish_reason TEXT,
38 num_images INTEGER,
39 our_api_token INTEGER NOT NULL
40 )

Towniequeries.tsx4 matches

@valdottown•Updated 3 hours ago
54 model,
55 finish_reason,
56 num_images,
57 our_api_token,
58}: {
66 model: string;
67 finish_reason: string;
68 num_images: number;
69 our_api_token: boolean;
70}) {
90 price,
91 finish_reason,
92 num_images,
93 our_api_token
94 ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
107 price,
108 finish_reason,
109 num_images,
110 our_api_token ? 1 : 0,
111 ],

glifTestmain.tsx1 match

@jonbo•Updated 4 hours ago
1export default async function(req: Request): Promise<Response> {
2 return Response.json({
3 image_url: "https://jon.bo/IMG_9387.png",
4 video_url: "https://brainrot.i12bp8.xyz/videos/reddit_video_54000.mp4",
5 audio_url: "https://res.cloudinary.com/dzkwltgyd/video/upload/v1746471301/glif-app/s43eeo9zs7ecxloj6mcr.webm",

testPondiversegetCreations3 matches

@argmn•Updated 4 hours ago
12 // Iterate through each one and delete it's blob
13 for (const row of res.rows) {
14 if (row.image) {
15 blob.delete("pondiverse_image" + row.id);
16 }
17 }
55 // for (let creation of response.rows) {
56 // creation.url = `https://pondiverse.val.run/get-creation?id=${creation.id}`;
57 // creation.image = `https://pondiverse.val.run/get-creation-image?id=${creation.id}`;
58 // }
59

image-inpainting1 file match

@themichaellai•Updated 9 hours ago

brainrot_image_gen1 file match

@dcm31•Updated 1 week ago
Generate images for Italian Brainrot characters using FAL AI
Chrimage
Atiq
"Focal Lens with Atig Wazir" "Welcome to my photography journey! I'm Atiq Wazir, a passionate photographer capturing life's beauty one frame at a time. Explore my gallery for stunning images, behind-the-scenes stories, and tips & tricks to enhance your own