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%22Image%20title%22?q=openai&page=28&format=json

For typeahead suggestions, use the /typeahead endpoint:

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

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

Found 1604 results for "openai"(947ms)

o3Artmain.tsx1 match

@dcm31โ€ขUpdated 3 weeks ago
2 * Paste this whole file into a new Val and hit save.
3 * It renders an endlessly swirling radial vortex with shifting colours.
4 * โ€“ ChatGPT (OpenAI o3) 2025โ€‘04โ€‘17
5 */
6

wondrousMaroonPeafowlmain.tsx3 matches

@allโ€ขUpdated 3 weeks ago
67 console.log("๐ŸŽค Sending request to Groq Whisper API");
68 const start = Date.now();
69 const response = await fetch("https://api.groq.com/openai/v1/audio/transcriptions", {
70 method: "POST",
71 headers: {
155 console.log("๐Ÿ”ต Sending request to Groq API");
156 const start = Date.now();
157 const response = await fetch("https://api.groq.com/openai/v1/chat/completions", {
158 method: "POST",
159 headers: {
211 console.log("๐Ÿ”Š Sending request to Groq Speech API");
212 const start = Date.now();
213 const response = await fetch("https://api.groq.com/openai/v1/audio/speech", {
214 method: "POST",
215 headers: {

stevensDemo.cursorrules4 matches

@hashbrownโ€ขUpdated 3 weeks ago
100Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
101
102### OpenAI
103```ts
104import { OpenAI } from "https://esm.town/v/std/openai";
105const openai = new OpenAI();
106const completion = await openai.chat.completions.create({
107 messages: [
108 { role: "user", content: "Say hello in a creative way" },

stevensDemo.cursorrules4 matches

@tuckerwildeโ€ขUpdated 3 weeks ago
100Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
101
102### OpenAI
103```ts
104import { OpenAI } from "https://esm.town/v/std/openai";
105const openai = new OpenAI();
106const completion = await openai.chat.completions.create({
107 messages: [
108 { role: "user", content: "Say hello in a creative way" },

groqAudioChatmain.tsx3 matches

@allโ€ขUpdated 3 weeks ago
68 console.log("๐ŸŽค Sending request to Groq Whisper API");
69 const start = Date.now();
70 const response = await fetch("https://api.groq.com/openai/v1/audio/transcriptions", {
71 method: "POST",
72 headers: {
158 console.log("๐Ÿ”ต Sending request to Groq API");
159 const start = Date.now();
160 const response = await fetch("https://api.groq.com/openai/v1/chat/completions", {
161 method: "POST",
162 headers: {
216 console.log("๐Ÿ”Š Sending request to Groq Speech API");
217 const start = Date.now();
218 const response = await fetch("https://api.groq.com/openai/v1/audio/speech", {
219 method: "POST",
220 headers: {

stevensDemo.cursorrules4 matches

@kahanโ€ขUpdated 3 weeks ago
100Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
101
102### OpenAI
103```ts
104import { OpenAI } from "https://esm.town/v/std/openai";
105const openai = new OpenAI();
106const completion = await openai.chat.completions.create({
107 messages: [
108 { role: "user", content: "Say hello in a creative way" },

OpenTowniesystem_prompt.txt4 matches

@stevekrouseโ€ขUpdated 3 weeks ago
88Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
89
90### OpenAI
91
92```ts
93import { OpenAI } from "https://esm.town/v/std/openai";
94const openai = new OpenAI();
95const completion = await openai.chat.completions.create({
96 messages: [
97 { role: "user", content: "Say hello in a creative way" },

stevensDemo.cursorrules4 matches

@vilozioโ€ขUpdated 3 weeks ago
100Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
101
102### OpenAI
103```ts
104import { OpenAI } from "https://esm.town/v/std/openai";
105const openai = new OpenAI();
106const completion = await openai.chat.completions.create({
107 messages: [
108 { role: "user", content: "Say hello in a creative way" },

textToEmojimain.tsx8 matches

@dcm31โ€ขUpdated 3 weeks ago
52{
53 "emoji": "Single emoji summarizing the text",
54 "fullResponse": "JSON string containing the full OpenAI API response",
55 "fromCache": "Boolean indicating whether the response was retrieved from cache"
56}
59{
60 "emoji": "๐Ÿ•",
61 "fullResponse": "{ ... full OpenAI API response ... }",
62 "fromCache": false
63}
64
65Note: The fullResponse field contains the complete OpenAI API response as a JSON string.
66You may want to parse this JSON string to access specific details of the API response.
67
110Caching:
111The API now uses SQLite to cache responses. If a request for the same text is made again,
112the cached emoji will be returned without calling the OpenAI API. This reduces API calls
113and improves response times for repeated queries.`}
114 </pre>
243
244export default async function server(request: Request): Promise<Response> {
245 const { OpenAI } = await import("https://esm.town/v/std/openai");
246 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
247 const openai = new OpenAI();
248
249 const url = new URL(request.url);
284 }
285
286 // If not in cache, call OpenAI API
287 const completion = await openai.chat.completions.create({
288 messages: [
289 { role: "system", content: "You are an emoji summarizer. Given a text, respond with exactly one emoji that best summarizes the content. Only respond with the single emoji, nothing else." },

myNewWebsite.cursorrules4 matches

@saatsazovโ€ขUpdated 3 weeks ago
100Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
101
102### OpenAI
103```ts
104import { OpenAI } from "https://esm.town/v/std/openai";
105const openai = new OpenAI();
106const completion = await openai.chat.completions.create({
107 messages: [
108 { role: "user", content: "Say hello in a creative way" },

translateToEnglishWithOpenAI1 file match

@shlmtโ€ขUpdated 1 day ago

testOpenAI1 file match

@stevekrouseโ€ขUpdated 3 days ago
lost1991
import { OpenAI } from "https://esm.town/v/std/openai"; export default async function(req: Request): Promise<Response> { if (req.method === "OPTIONS") { return new Response(null, { headers: { "Access-Control-Allow-Origin": "*",