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/$%7Bsuccess?q=api&page=935&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 18862 results for "api"(5320ms)

cerebras_coderREADME.md2 matches

@Trey39โ€ขUpdated 1 month ago
8
91. Sign up for [Cerebras](https://cloud.cerebras.ai/)
102. Get a Cerebras API Key
113. Save it in your project env variable called `CEREBRAS_API_KEY`

cerebras_coderindex.ts1 match

@Trey39โ€ขUpdated 1 month ago
211 } catch (error) {
212 Toastify({
213 text: "We may have hit our Cerebras Usage limits. Try again later or fork this and use your own API key.",
214 position: "center",
215 duration: 3000,

cerebras_coderindex.html3 matches

@Trey39โ€ขUpdated 1 month ago
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>CerebrasCoder</title>
7 <link rel="preconnect" href="https://fonts.googleapis.com" />
8 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
9 <link
10 href="https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap"
11 rel="stylesheet"
12 />
21 <meta property="og:description" content="Turn your ideas into fully functional apps in less than a second โ€“ powered by Llama3.3-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
22 <meta property="og:type" content="website">
23 <meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
24
25

cerebras_codergenerate-code.ts1 match

@Trey39โ€ขUpdated 1 month ago
16 };
17 } else {
18 const client = new Cerebras({ apiKey: Deno.env.get("CEREBRAS_API_KEY") });
19 const completion = await client.chat.completions.create({
20 messages: [

getdependenciesmain.tsx6 matches

@jdkdevโ€ขUpdated 1 month ago
1async function getLibrariesIoDependents(packageName: string) {
2 // Retrieve API key from environment variable
3 const apiKey = Deno.env.get("LIBRARY_IO");
4
5 if (!apiKey) {
6 throw new Error("Libraries.io API key is not configured");
7 }
8
9 try {
10 const url = `https://libraries.io/api/NPM/${packageName}/dependent_repositories?api_key=${apiKey}`;
11 const response = await fetch(url);
12
13 if (!response.ok) {
14 const errorText = await response.text();
15 throw new Error(`Libraries.io API error: ${errorText}`);
16 }
17

stevensDemoSETUP.md5 matches

@yumyabโ€ขUpdated 1 month ago
16- Create a fresh, empty database
17- Set up all necessary database tables and indexes
18- Import calendar events (if Google Calendar API credentials are set)
19
20### 2. Environment Variables
23
24#### For LLM functionality:
25- `ANTHROPIC_API_KEY` - For AI responses and daily briefings
26
27#### For Telegram integration:
31
32#### For Google Calendar integration:
33- `GOOGLE_CLIENT_ID` - Google API client ID
34- `GOOGLE_CLIENT_SECRET` - Google API client secret
35- `GOOGLE_REFRESH_TOKEN` - Google OAuth refresh token
36- `GOOGLE_CALENDAR_ID` - Your Google Calendar ID (or "primary")
93
94- Check your environment variables are correctly set
95- Ensure you have the necessary permissions for API calls
96- Look at the console logs for detailed error messages

stevensDemoREADME.md1 match

@yumyabโ€ขUpdated 1 month ago
53You'll need to set up some environment variables to make it run.
54
55- `ANTHROPIC_API_KEY` for LLM calls
56- You'll need to follow [these instructions](https://docs.val.town/integrations/telegram/) to make a telegram bot, and set `TELEGRAM_TOKEN`. You'll also need to get a `TELEGRAM_CHAT_ID` in order to have the bot remember chat contents. Optionally, add `TELEGRAM_SECONDARY_CHAT_ID` if you want to send briefings to multiple recipients.
57- For the Google Calendar integration you'll need `GOOGLE_CALENDAR_ACCOUNT_ID` and `GOOGLE_CALENDAR_CALENDAR_ID`. See [these instuctions](https://www.val.town/v/stevekrouse/pipedream) for details.

promptEvolvermain.tsx7 matches

@toowiredโ€ขUpdated 1 month ago
6
7// โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” Val.town/Backend Imports โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” //
8import { OpenAI } from "https://esm.town/v/std/openai"; // For backend API call
9import { html } from "https://esm.town/v/stevekrouse/html"; // For serving HTML
10
488export default async function server(req: Request): Promise<Response> {
489 const url = new URL(req.url);
490 const apiKey = Deno.env.get("OPENAI_API_KEY");
491
492 if (!apiKey) {
493 // ... (API key error handling remains the same) ...
494 const errorMsg = "Server configuration error: OPENAI_API_KEY secret not set.";
495 console.error(errorMsg);
496 if (req.method === "POST") return Response.json({ error: errorMsg }, { status: 500 });
497 return html(`<html><body><h1>Configuration Error</h1><p>${errorMsg}</p></body></html>`, { status: 500 });
498 }
499 const openai = new OpenAI({ apiKey: apiKey });
500
501 // --- API Endpoint (POST) ---
502 if (req.method === "POST") {
503 try {

telegramBotStarterindex.ts1 match

@kartchnbโ€ขUpdated 1 month ago
30 // This is a no-op if nothing's changed
31 if (!isEndpointSet) {
32 await bot.api.setWebhook(req.url, {
33 secret_token: SECRET_TOKEN,
34 });

stevensDemosendDailyBrief.ts8 matches

@nicnzlโ€ขUpdated 1 month ago
97
98export async function sendDailyBriefing(chatId?: string, today?: DateTime) {
99 // Get API keys from environment
100 const apiKey = Deno.env.get("ANTHROPIC_API_KEY");
101 const telegramToken = Deno.env.get("TELEGRAM_TOKEN");
102
106 }
107
108 if (!apiKey) {
109 console.error("Anthropic API key is not configured.");
110 return;
111 }
122
123 // Initialize Anthropic client
124 const anthropic = new Anthropic({ apiKey });
125
126 // Initialize Telegram bot
162
163 // disabled title for now, it seemes unnecessary...
164 // await bot.api.sendMessage(chatId, `*${title}*`, { parse_mode: "Markdown" });
165
166 // Then send the main content
169
170 if (content.length <= MAX_LENGTH) {
171 await bot.api.sendMessage(chatId, content, { parse_mode: "Markdown" });
172 // Store the briefing in chat history
173 await storeChatMessage(
198 // Send each chunk as a separate message and store in chat history
199 for (const chunk of chunks) {
200 await bot.api.sendMessage(chatId, chunk, { parse_mode: "Markdown" });
201 // Store each chunk in chat history
202 await storeChatMessage(

api_zenithpayments_com

@ianmenethilโ€ขUpdated 8 hours ago

helloEffectHttpApi1 file match

@mattrossmanโ€ขUpdated 22 hours ago
apiry
snartapi