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//%22https:/unpkg.com/bamboo.css/%22?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 12761 results for "image"(1629ms)

flowxo-http-bot-sampleindex.html1 match

@flowxoβ€’Updated 27 mins ago
14 rel="icon"
15 href="https://glitch.com/edit/favicon-app.ico"
16 type="image/x-icon"
17 > -->
18 <!-- import the webpage's stylesheet -->
Gemini-2-5-Pro-O-01

Gemini-2-5-Pro-O-01main.tsx61 matches

@aibotcommanderβ€’Updated 29 mins ago
2import { OpenAI } from "npm:openai";
3
4const IMAGE_COST = 400;
5const TEXT_COST = 400;
6const FILE_ANALYSIS_COST = 400;
44
45const POE_MODELS = {
46 imageGeneration: [
47 "Flux-schnell",
48 "Flux-schnell-DI",
49 "ImageCreatorSD",
50 "Free-GPT-Image-1"
51 ],
52 textGeneration: [
65 "Llama-3.1-8b-DI"
66 ],
67 imageAnalysis: [
68 "Qwen3-235B-A22B",
69 "Gemini-1.5-Flash",
118
119function selectOptimalTokens(contentLength: number, taskType: string): number {
120 if (taskType === "Image Generation") return 1024;
121 if (contentLength < 100) return 1024; // Short queries
122 if (contentLength < 500) return 1500; // Medium queries
130 taskType: string,
131 timeout: number = 15000,
132 isImageGeneration: boolean = false
133): Promise<string | null> {
134 try {
153 const content = message?.content;
154
155 if (isImageGeneration && message?.attachments && message.attachments.length > 0) {
156 const imageAttachment = message.attachments.find(att =>
157 att.content_type && att.content_type.startsWith('image/')
158 );
159 if (imageAttachment && imageAttachment.url) {
160 return imageAttachment.url;
161 }
162 }
175 taskType: string,
176 timeout: number = 15000,
177 isImageGeneration: boolean = false
178): Promise<string | null> {
179 // Try first 2 models in parallel for speed
187 for (const model of parallelModels) {
188 promises.push(
189 callSinglePoeModel(model, prompt, keyIndex, taskType, timeout, isImageGeneration)
190 .then(result => ({ result, model, keyIndex }))
191 );
203 console.log(`Success with ${successful.value.model} (API key ${successful.value.keyIndex + 1})`);
204
205 if (isImageGeneration) {
206 const urlMatch = successful.value.result.match(/https?:\/\/[^\s]+\.(jpg|jpeg|png|gif|webp)/i);
207 if (urlMatch) {
208 send("replace_response", {
209 text: `🎨 **${taskType} by Gemini-2.5-Pro-Omni completed**\n\n![Generated Image](${urlMatch[0]})`
210 });
211 return urlMatch[0];
232 for (const model of remainingModels) {
233 for (let keyIndex = 0; keyIndex < POE_API_KEYS.length; keyIndex++) {
234 const result = await callSinglePoeModel(model, prompt, keyIndex, taskType, timeout, isImageGeneration);
235 if (result) {
236 if (isImageGeneration) {
237 const urlMatch = result.match(/https?:\/\/[^\s]+\.(jpg|jpeg|png|gif|webp)/i);
238 if (urlMatch) {
239 send("replace_response", {
240 text: `🎨 **${taskType} by Gemini-2.5-Pro-Omni completed**\n\n![Generated Image](${urlMatch[0]})`
241 });
242 return urlMatch[0];
260}
261
262async function imageToBase64(imageUrl: string): Promise<{ data: string; mimeType: string }> {
263 try {
264 const response = await fetch(imageUrl, { timeout: 8000 });
265 if (!response.ok) {
266 throw new Error(`Failed to fetch image: ${response.status}`);
267 }
268 const arrayBuffer = await response.arrayBuffer();
269 const buffer = Buffer.from(arrayBuffer);
270 const mimeType = response.headers.get('content-type') || 'image/jpeg';
271 return { data: buffer.toString('base64'), mimeType: mimeType };
272 } catch (error) {
273 console.error('Error converting image to base64:', error);
274 throw error;
275 }
281 send: SendEventFn,
282 taskType: string,
283 imageUrl?: string
284): Promise<string | null> {
285 try {
287
288 let parts: any[] = [{ text: prompt }];
289 if (imageUrl) {
290 const { data: imageBase64, mimeType } = await imageToBase64(imageUrl);
291 parts.push({
292 inline_data: {
293 mime_type: mimeType,
294 data: imageBase64
295 }
296 });
338}
339
340async function generateImage(prompt: string, send: SendEventFn): Promise<void> {
341 let cleanPrompt = prompt;
342 if (cleanPrompt.endsWith('--image')) {
343 cleanPrompt = cleanPrompt.substring(0, cleanPrompt.length - 7).trim();
344 }
345
346 const imagePrompt = `Detailed ${cleanPrompt}`;
347 send("text", { text: `🎨 Generating image...` });
348
349 const result = await callPoeModelParallel(
350 POE_MODELS.imageGeneration,
351 imagePrompt,
352 send,
353 "Image Generation",
354 15000,
355 true
358 if (!result) {
359 send("error", {
360 text: `❌ Image generation failed: All models exhausted.`,
361 allow_retry: true
362 });
436}
437
438async function analyzeImage(imageUrl: string, userPrompt: string, send: SendEventFn): Promise<void> {
439 let analysisPrompt: string;
440 if (!userPrompt || userPrompt.trim().length === 0) {
441 analysisPrompt = `Analyze this image in detail. Provide a comprehensive analysis including what you see, colors, objects, people, text, context, and any other relevant details.`;
442 } else {
443 analysisPrompt = `${userPrompt}`;
444 }
445
446 send("text", { text: `πŸ” Analyzing image...` });
447
448 // Try Gemini Pro with vision first
449 const geminiResult = await callGeminiApi(GEMINI_VISION_CONFIG, analysisPrompt, send, "Image Analysis", imageUrl);
450 if (geminiResult) return;
451
452 // Fallback to Poe models with URL reference
453 const fallbackPrompt = `Analyze image: ${imageUrl}\n\nUser's request: ${userPrompt || "Provide detailed analysis"}`;
454 const poeResult = await callPoeModelParallel(
455 POE_MODELS.imageAnalysis,
456 fallbackPrompt,
457 send,
458 "Image Analysis",
459 15000
460 );
462 if (!poeResult) {
463 send("error", {
464 text: `❌ Image analysis failed: All models exhausted.`,
465 allow_retry: true
466 });
509 }
510
511 if (cleanContent.endsWith('--image')) {
512 return { intent: 'image_generation', useClaudeModels };
513 }
514
518
519 if (hasAttachments) {
520 if (lowerContent.includes('image') || lowerContent.includes('picture') ||
521 lowerContent.includes('photo') || lowerContent.includes('analyze') ||
522 lowerContent.includes('what') || lowerContent.includes('describe')) {
523 return { intent: 'image_analysis', useClaudeModels };
524 }
525 return { intent: 'file_analysis', useClaudeModels };
526 }
527
528 if (lowerContent.includes('generate image') || lowerContent.includes('create image') ||
529 lowerContent.includes('draw') || lowerContent.includes('picture of') ||
530 lowerContent.includes('image of')) {
531 return { intent: 'image_generation', useClaudeModels };
532 }
533
563 try {
564 switch (intent) {
565 case 'image_generation':
566 await generateImage(userContent, send);
567 break;
568
590 break;
591
592 case 'image_analysis':
593 if (attachments.length > 0) {
594 const imageAttachment = attachments.find(att =>
595 att.content_type && att.content_type.startsWith('image/')
596 );
597 if (imageAttachment && imageAttachment.url) {
598 await analyzeImage(imageAttachment.url, userContent, send);
599 } else {
600 send("error", {
605 } else {
606 send("error", {
607 text: "Please attach an image for analysis.",
608 allow_retry: false,
609 });
652 const rateCard = "| Task Type | Price |\n" +
653 "|-----------|-------|\n" +
654 `| Input (image) | ${IMAGE_COST} points/message |\n` +
655 `| Input (file) | ${FILE_ANALYSIS_COST} points/message |\n` +
656 `| Input (text) | ${TEXT_COST} points/message |\n` +
657 `| Output (search) | ${SEARCH_COST} points/message |\n` +
658 `| Output (image) | ${IMAGE_COST} points/message |\n`;
659
660 return {

SonarTODO.txt1 match

@moeβ€’Updated 32 mins ago
11tip
12swap
13og images: starter pack (copy from other miniapp)
14viewer fid in neynar requests
15starter pack galleries
Gemini-2-5-Pro-O-02

Gemini-2-5-Pro-O-02main.tsx61 matches

@aibotcommanderβ€’Updated 33 mins ago
2import { OpenAI } from "npm:openai";
3
4const IMAGE_COST = 400;
5const TEXT_COST = 400;
6const FILE_ANALYSIS_COST = 400;
44
45const POE_MODELS = {
46 imageGeneration: [
47 "Flux-schnell",
48 "Flux-schnell-DI",
49 "ImageCreatorSD",
50 "Free-GPT-Image-1"
51 ],
52 textGeneration: [
65 "Llama-3.1-8b-DI"
66 ],
67 imageAnalysis: [
68 "Qwen3-235B-A22B",
69 "Gemini-1.5-Flash",
118
119function selectOptimalTokens(contentLength: number, taskType: string): number {
120 if (taskType === "Image Generation") return 1024;
121 if (contentLength < 100) return 1024; // Short queries
122 if (contentLength < 500) return 1500; // Medium queries
130 taskType: string,
131 timeout: number = 15000,
132 isImageGeneration: boolean = false
133): Promise<string | null> {
134 try {
153 const content = message?.content;
154
155 if (isImageGeneration && message?.attachments && message.attachments.length > 0) {
156 const imageAttachment = message.attachments.find(att =>
157 att.content_type && att.content_type.startsWith('image/')
158 );
159 if (imageAttachment && imageAttachment.url) {
160 return imageAttachment.url;
161 }
162 }
175 taskType: string,
176 timeout: number = 15000,
177 isImageGeneration: boolean = false
178): Promise<string | null> {
179 // Try first 2 models in parallel for speed
187 for (const model of parallelModels) {
188 promises.push(
189 callSinglePoeModel(model, prompt, keyIndex, taskType, timeout, isImageGeneration)
190 .then(result => ({ result, model, keyIndex }))
191 );
203 console.log(`Success with ${successful.value.model} (API key ${successful.value.keyIndex + 1})`);
204
205 if (isImageGeneration) {
206 const urlMatch = successful.value.result.match(/https?:\/\/[^\s]+\.(jpg|jpeg|png|gif|webp)/i);
207 if (urlMatch) {
208 send("replace_response", {
209 text: `🎨 **${taskType} by Gemini-2.5-Pro-Omni completed**\n\n![Generated Image](${urlMatch[0]})`
210 });
211 return urlMatch[0];
232 for (const model of remainingModels) {
233 for (let keyIndex = 0; keyIndex < POE_API_KEYS.length; keyIndex++) {
234 const result = await callSinglePoeModel(model, prompt, keyIndex, taskType, timeout, isImageGeneration);
235 if (result) {
236 if (isImageGeneration) {
237 const urlMatch = result.match(/https?:\/\/[^\s]+\.(jpg|jpeg|png|gif|webp)/i);
238 if (urlMatch) {
239 send("replace_response", {
240 text: `🎨 **${taskType} by Gemini-2.5-Pro-Omni completed**\n\n![Generated Image](${urlMatch[0]})`
241 });
242 return urlMatch[0];
260}
261
262async function imageToBase64(imageUrl: string): Promise<{ data: string; mimeType: string }> {
263 try {
264 const response = await fetch(imageUrl, { timeout: 8000 });
265 if (!response.ok) {
266 throw new Error(`Failed to fetch image: ${response.status}`);
267 }
268 const arrayBuffer = await response.arrayBuffer();
269 const buffer = Buffer.from(arrayBuffer);
270 const mimeType = response.headers.get('content-type') || 'image/jpeg';
271 return { data: buffer.toString('base64'), mimeType: mimeType };
272 } catch (error) {
273 console.error('Error converting image to base64:', error);
274 throw error;
275 }
281 send: SendEventFn,
282 taskType: string,
283 imageUrl?: string
284): Promise<string | null> {
285 try {
287
288 let parts: any[] = [{ text: prompt }];
289 if (imageUrl) {
290 const { data: imageBase64, mimeType } = await imageToBase64(imageUrl);
291 parts.push({
292 inline_data: {
293 mime_type: mimeType,
294 data: imageBase64
295 }
296 });
338}
339
340async function generateImage(prompt: string, send: SendEventFn): Promise<void> {
341 let cleanPrompt = prompt;
342 if (cleanPrompt.endsWith('--image')) {
343 cleanPrompt = cleanPrompt.substring(0, cleanPrompt.length - 7).trim();
344 }
345
346 const imagePrompt = `Detailed ${cleanPrompt}`;
347 send("text", { text: `🎨 Generating image...` });
348
349 const result = await callPoeModelParallel(
350 POE_MODELS.imageGeneration,
351 imagePrompt,
352 send,
353 "Image Generation",
354 15000,
355 true
358 if (!result) {
359 send("error", {
360 text: `❌ Image generation failed: All models exhausted.`,
361 allow_retry: true
362 });
436}
437
438async function analyzeImage(imageUrl: string, userPrompt: string, send: SendEventFn): Promise<void> {
439 let analysisPrompt: string;
440 if (!userPrompt || userPrompt.trim().length === 0) {
441 analysisPrompt = `Analyze this image in detail. Provide a comprehensive analysis including what you see, colors, objects, people, text, context, and any other relevant details.`;
442 } else {
443 analysisPrompt = `${userPrompt}`;
444 }
445
446 send("text", { text: `πŸ” Analyzing image...` });
447
448 // Try Gemini Pro with vision first
449 const geminiResult = await callGeminiApi(GEMINI_VISION_CONFIG, analysisPrompt, send, "Image Analysis", imageUrl);
450 if (geminiResult) return;
451
452 // Fallback to Poe models with URL reference
453 const fallbackPrompt = `Analyze image: ${imageUrl}\n\nUser's request: ${userPrompt || "Provide detailed analysis"}`;
454 const poeResult = await callPoeModelParallel(
455 POE_MODELS.imageAnalysis,
456 fallbackPrompt,
457 send,
458 "Image Analysis",
459 15000
460 );
462 if (!poeResult) {
463 send("error", {
464 text: `❌ Image analysis failed: All models exhausted.`,
465 allow_retry: true
466 });
509 }
510
511 if (cleanContent.endsWith('--image')) {
512 return { intent: 'image_generation', useClaudeModels };
513 }
514
518
519 if (hasAttachments) {
520 if (lowerContent.includes('image') || lowerContent.includes('picture') ||
521 lowerContent.includes('photo') || lowerContent.includes('analyze') ||
522 lowerContent.includes('what') || lowerContent.includes('describe')) {
523 return { intent: 'image_analysis', useClaudeModels };
524 }
525 return { intent: 'file_analysis', useClaudeModels };
526 }
527
528 if (lowerContent.includes('generate image') || lowerContent.includes('create image') ||
529 lowerContent.includes('draw') || lowerContent.includes('picture of') ||
530 lowerContent.includes('image of')) {
531 return { intent: 'image_generation', useClaudeModels };
532 }
533
563 try {
564 switch (intent) {
565 case 'image_generation':
566 await generateImage(userContent, send);
567 break;
568
590 break;
591
592 case 'image_analysis':
593 if (attachments.length > 0) {
594 const imageAttachment = attachments.find(att =>
595 att.content_type && att.content_type.startsWith('image/')
596 );
597 if (imageAttachment && imageAttachment.url) {
598 await analyzeImage(imageAttachment.url, userContent, send);
599 } else {
600 send("error", {
605 } else {
606 send("error", {
607 text: "Please attach an image for analysis.",
608 allow_retry: false,
609 });
652 const rateCard = "| Task Type | Price |\n" +
653 "|-----------|-------|\n" +
654 `| Input (image) | ${IMAGE_COST} points/message |\n` +
655 `| Input (file) | ${FILE_ANALYSIS_COST} points/message |\n` +
656 `| Input (text) | ${TEXT_COST} points/message |\n` +
657 `| Output (search) | ${SEARCH_COST} points/message |\n` +
658 `| Output (image) | ${IMAGE_COST} points/message |\n`;
659
660 return {

dotcomGoogol.tsx1 match

@petermillspaughβ€’Updated 46 mins ago
68 </a>{" "}
69 right there on Google Domains for just $12 at 1:20am (really conjuring
70 the hooded hacker image in the middle of the night). He owned it for all
71 of one minute before Google reversed the transaction. Google{" "}
72 <a href="https://security.googleblog.com/2016/01/google-security-rewards-2015-year-in.html">

zoomtestmain.js4 matches

@yawnxyzβ€’Updated 59 mins ago
574 <meta charset="UTF-8">
575 <meta name="viewport" content="width=device-width, initial-scale=1.0">
576 <link rel="icon" type="image/png" href="https://labspace.ai/ls2-circle.png" />
577 <title>Zoom RTMS Test App</title>
578 <meta property="og:title" content="Zoom RTMS Test App" />
579 <meta property="og:description" content="Test application for Zoom Real-Time Messaging Service OAuth integration" />
580 <meta property="og:image" content="https://yawnxyz-og.web.val.run/img?link=https://yawnxyz-boink.web.val.run&title=Zoom+RTMS+Test&subtitle=Test+app+for+Zoom+OAuth+integration" />
581 <meta property="og:url" content="https://yawnxyz-boink.web.val.run/" />
582 <meta property="og:type" content="website" />
583 <meta name="twitter:card" content="summary_large_image" />
584 <meta name="twitter:title" content="Zoom RTMS Test App" />
585 <meta name="twitter:description" content="Test application for Zoom Real-Time Messaging Service OAuth integration" />
586 <meta name="twitter:image" content="https://yawnxyz-og.web.val.run/img?link=https://yawnxyz-boink.web.val.run&title=Zoom+RTMS+Test&subtitle=Test+app+for+Zoom+OAuth+integration" />
587 <script src="https://cdn.tailwindcss.com"></script>
588 <script src="https://unpkg.com/dexie@3.2.2/dist/dexie.js"></script>

zoomtest.cursorrules2 matches

@yawnxyzβ€’Updated 1 hour ago
178
179- **Redirects:** Use `return new Response(null, { status: 302, headers: { Location: "/place/to/redirect" }})` instead of `Response.redirect` which is broken
180- **Images:** Avoid external images or base64 images. Use emojis, unicode symbols, or icon fonts/libraries instead
181- **AI Image:** To inline generate an AI image use: `<img src="https://maxm-imggenurl.web.val.run/the-description-of-your-image" />`
182- **Storage:** DO NOT use the Deno KV module for storage
183- **Browser APIs:** DO NOT use the `alert()`, `prompt()`, or `confirm()` methods

basic-html-starterindex.html1 match

@xaelzephβ€’Updated 2 hours ago
11
12 <!-- reference the webpage's favicon. note: currently only svg is supported in val town files -->
13 <link rel="icon" href="/favicon.svg" sizes="any" type="image/svg+xml">
14
15 <!-- import the webpage's javascript file -->

nabanhotelmain.ts1 match

@francisnkotanyiβ€’Updated 5 hours ago
11<style>body { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial; }</n/style>
12<style>
13.hero-bg { background-image: linear-gradient(90deg, rgba(2,6,23,0.55), rgba(2,6,23,0.35)), url('https://images.unsplash.com/photo-1501117716987-c8e2f7a1b1a7?auto=format&fit=crop&w=1600&q=60'); background-size: cover; background-position: center; }
14.gallery-img { background-size: cover; background-position: center; }
15</style>

campanhapsdalcoframain.ts4 matches

@nmsilvaβ€’Updated 6 hours ago
93 profissao: "Profissional de Seguros",
94 localidade: "Oliveira de Frades",
95 foto: "https://i.postimg.cc/L6ckF9GG/cropped-circle-image-2.png",
96 },
97 {
99 profissao: "Programador InformΓ‘tico",
100 localidade: "Agros-Alcofra",
101 foto: "https://i.postimg.cc/vTVHLzP2/cropped-circle-image-1.png",
102 },
103 {
105 profissao: "Auxiliar Educativa",
106 localidade: "Ribeira-Alcofra",
107 foto: "https://i.postimg.cc/NMVjHVxr/cropped-circle-image.png",
108 },
109 ];
697 <meta name="viewport" content="width=device-width, initial-scale=1.0">
698 <script src="https://cdn.tailwindcss.com"></script>
699 <link rel="icon" href="https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Flag_of_the_Social_Democratic_Party_%28Portugal%29.svg/1200px-Flag_of_the_Social_Democratic_Party_%28Portugal%29.svg.png" type="image/png" />
700 <style>
701 </style>
Gemini-2-5-Pro-O-01

Gemini-2-5-Pro-O-011 file match

@aibotcommanderβ€’Updated 29 mins ago
Multimodal Image Generator: https://poe.com/Gemini-2.5-Pro-Omni

ImageThing

@refactorizedβ€’Updated 2 days ago
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