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=30&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 11842 results for "api"(558ms)

openstreetmapAPIexample2 file matches

@tmcwUpdated 1 year ago

apiExample2 file matches

@stevekrouseUpdated 1 year ago

nakedAPIEx2 file matches

@stevekrouseUpdated 1 year ago

myApi1 file match

@johnlawverUpdated 1 year ago

api21 file match

@endingwithaliUpdated 1 year ago

myApi1 file match

@gjugglerUpdated 1 year ago

myApi1 file match

@matalloUpdated 1 year ago

myApi1 file match

@luxianUpdated 1 year ago

myApi1 file match

@sinakhaliliUpdated 1 year ago

myApi1 file match

@moodyUpdated 1 year ago

parallelmain.ts9 matches

@salonUpdated 1 hour ago
127interface OpenAiCallToolConfig extends BaseToolConfig {
128 defaultModel?: string;
129 // API key is handled by Val Town's OpenAI client, not needed here.
130}
131
608 }
609
610 const apiRequestBody: any = {
611 model: model,
612 messages: messagesPayload,
613 };
614 if (typeof params.temperature === "number") apiRequestBody.temperature = params.temperature;
615 if (typeof params.max_tokens === "number") apiRequestBody.max_tokens = params.max_tokens;
616
617 log("INFO", "OpenAiCallTool", `Making OpenAI call to model ${model} using Val Town's OpenAI client.`, {
618 parameters: {
619 model: apiRequestBody.model,
620 messageCount: messagesPayload.length,
621 messages: messagesPayload,
622 temperature: apiRequestBody.temperature,
623 max_tokens: apiRequestBody.max_tokens,
624 },
625 });
626
627 try {
628 const completion = await openaiClient.chat.completions.create(apiRequestBody);
629 log("SUCCESS", "OpenAiCallTool", "OpenAI call successful via Val Town client.");
630 return { mandateId, correlationId: taskId, payload: { result: completion } };
632 log("ERROR", "OpenAiCallTool", "Failed to execute OpenAI call via Val Town client", e);
633 const errorMessage = e.response?.data?.error?.message || e.message
634 || "Unknown OpenAI API error via Val Town client";
635 return { mandateId, correlationId: taskId, payload: { result: null }, error: errorMessage };
636 }

cerebras_coderstarter-prompts.js1 match

@OmShankarUpdated 1 hour ago
12 },
13 {
14 "prompt": "weather dashboard for nyc using open-meteo API for NYC with icons",
15 "title": "Weather App",
16 "code":
papimark21
socialdata
Affordable & reliable alternative to Twitter API: ➡️ Access user profiles, tweets, followers & timeline data in real-time ➡️ Monitor profiles with nearly instant alerts for new tweets, follows & profile updates ➡️ Simple integration