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=image&page=602&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 6557 results for "image"(909ms)

generateImageHandlermain.tsx7 matches

@iamseeleyUpdated 10 months ago
5});
6
7export const generateImageHandler = async (req: Request): Promise<Response> => {
8 try {
9 const {
12 prompt,
13 negative_prompt = "",
14 image_size,
15 num_inference_steps,
16 guidance_scale,
17 seed,
18 num_images,
19 enable_safety_checker,
20 sync_mode,
28 prompt,
29 negative_prompt,
30 image_size,
31 num_inference_steps: parseInt(num_inference_steps),
32 guidance_scale: guidance_scale ? parseFloat(guidance_scale) : undefined,
33 seed: seed ? parseInt(seed) : undefined,
34 num_images: parseInt(num_images),
35 enable_safety_checker: enable_safety_checker !== undefined ? enable_safety_checker : true,
36 sync_mode: sync_mode !== undefined ? sync_mode : undefined,
40 });
41
42 const imageUrls = result.images.map((image: any) => image.url);
43
44 return new Response(JSON.stringify({ imageUrls }), {
45 headers: { "Content-Type": "application/json" },
46 status: 200,

caloriesmain.tsx5 matches

@chriswmartinUpdated 10 months ago
1/** @jsxImportSource npm:hono@3/jsx */
2import { fileToDataURL } from "https://esm.town/v/stevekrouse/fileToDataURL";
3import { modifyImage } from "https://esm.town/v/stevekrouse/modifyImage";
4import { chat } from "https://esm.town/v/stevekrouse/openai";
5import { Hono } from "npm:hono@3";
50 type="file"
51 id="file"
52 accept="image/*"
53 name="file"
54 />
115 {
116 role: "user",
117 content: `What is the calorie count in this image?`,
118 },
119 {
120 role: "user",
121 content: [{
122 type: "image_url",
123 image_url: {
124 url: dataURL,
125 },

fileToDataURLREADME.md1 match

@chriswmartinUpdated 10 months ago
1# File to Data URL
2
3Was built for uploading base64 encoded images to GPT4v

uploadImageREADME.md2 matches

@chriswmartinUpdated 10 months ago
1# uploadImage
2uploads an image to val.town just like when you paste an image into a readme

uploadImagemain.tsx6 matches

@chriswmartinUpdated 10 months ago
1/**
2 * upload an image to val.town
3 * @param {Blob} image - image must have image/jpeg, image/png, image/webp, image/gif or image/svg+xml content-type
4 * @returns {string} - uploaded image url
5 */
6export async function uploadImage(image: Blob): Promise<string> {
7 const fd = new FormData();
8 fd.append(
9 "file",
10 image,
11 );
12 const data = await (await fetch(await getUploadURL(), {
24}
25async function getUploadURL(): Promise<string> {
26 const data = await (await fetch("https://www.val.town/api/trpc/generateImageUploadUrl", {
27 "headers": {
28 "content-type": "application/json",

blob_adminREADME.md1 match

@tarasUpdated 10 months ago
3This is a lightweight Blob Admin interface to view and debug your Blob data.
4
5![b7321ca2cd80899250589b9aa08bc3cae9c7cea276282561194e7fc537259b46.png](https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/311a81bb-18d8-4583-b7e3-64bac326f700/public)
6
7Use this button to install the val:

formStylesREADME.md1 match

@iamseeleyUpdated 10 months ago
1Migrated from folder: image_gen/formStyles

formLogicREADME.md1 match

@iamseeleyUpdated 10 months ago
1Migrated from folder: image_gen/formLogic

generateImageHandlerREADME.md1 match

@iamseeleyUpdated 10 months ago
1Migrated from folder: image_gen/generateImageHandler

textToImagePlaygroundREADME.md2 matches

@iamseeleyUpdated 10 months ago
1## 🖼️ text to image playground using [fal.ai](https://fal.ai) model apis
2
3Migrated from folder: image_gen/textToImagePlayground

image-gen

@armadillomikeUpdated 18 hours ago

gpt-image-test1 file match

@CaptainJackUpdated 2 days ago
测试 gpt image 的不同 api 能否满足图片生成要求
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