pinme-llm

Solid

Use this skill when a PinMe project (Worker TypeScript) needs to call OpenRouter-backed LLM APIs, including models, chat/completions, streaming, or OpenRouter web search. Guides AI to generate correct Worker TS code.

AI & Automation 3,659 stars 270 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 91/100

Stars 20%
100
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# PinMe Worker OpenRouter API Integration Guides how to call PinMe platform's OpenRouter proxy APIs in a PinMe Worker (TypeScript). Workers use the PinMe project API key; they never hold the real OpenRouter API key. ## Environment Variables The following environment variables are automatically injected when the Worker is created — no manual configuration needed: ```typescript // backend/src/worker.ts export interface Env { DB: D1Database; API_KEY: string; // Project API Key from create_worker PROJECT_NAME: string; // Actual project_name from create_worker; must match API_KEY BASE_URL?: string; // Optional override for PinMe API base URL, defaults to https://pinme.cloud } ``` > `API_KEY` authenticates the Worker to PinMe. `PROJECT_NAME` is required for `chat/completions` and must belong to the same project as `API_KEY`. When `BASE_URL` is not set, use `https://pinme.cloud`. --- ## Models API **Endpoint:** `GET {BASE_URL}/api/v1/models` **Authentication:** `X-API-Key` header (using `env.API_KEY`) **Request Body:** none Use this when the Worker needs to list available OpenRouter models. The response body, status, and headers are passed through from OpenRouter `/models`. ```typescript async function listModels(env: Env): Promise<unknown> { const baseUrl = env.BASE_URL ?? 'https://pinme.cloud'; const resp = await fetch(`${baseUrl}/api/v1/models`, { headers: { 'X-API-Key': env.API_KEY }, }); if (!resp.ok) { throw new Error(await extract...

Details

Author
glitternetwork
Repository
glitternetwork/pinme
Created
1 years ago
Last Updated
1 weeks ago
Language
TypeScript
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category