This skill documents two PinMe proxy endpoints for language models: a models list and chat completions in the OpenRouter format. The Worker authenticates with the PinMe project API key and project name, and never holds the real OpenRouter key.
It includes non-streaming and streaming TypeScript examples, a browser function that reads the server-sent event stream, the OpenRouter web search tool with result limits, an error table and helper functions that read PinMe and OpenRouter errors.
What You Get
- A listModels function and a callLLM function for Workers
- A streaming handler that passes the event stream through to the browser
- A frontend reader that turns streamed chunks into text
- A web search example using the openrouter:web_search tool with bounded results
- An error extractor and a JSON helper for PinMe and OpenRouter responses
Common Use Cases
- Adding a chat endpoint to a PinMe app
- Streaming model output to a web page as it arrives
- Letting a model search the web for a question, with a cap on results
What Makes It Unique
The Worker never sees a provider key: PinMe holds it and bills the project’s LLM balance, and a 403 means the balance is too low. The skill also states that PinMe has no raw search endpoint and web search goes through the model tool.
Under The Hood
The skill supplies code for a Worker that sends HTTPS requests to the PinMe platform with the project API key, which forwards them to OpenRouter and can search the web when the search tool is set. It does not run commands or scripts. The agent writes Worker and frontend code in your project, and each model call uses the project’s LLM balance.