Skill: forceconstant/nano-gpt-plugin (version 0.1.3)

# NanoGPT Plugin NanoGPT provider plugin for OpenClaw with dynamic model catalog, auth, and usage tracking. ## Features - Dynamic model catalog from NanoGPT API - API key authentication via onboarding flow - Usage and balance tracking - Support for multiple model families (OpenAI, Anthropic, Google, xAI, DeepSeek, etc.) ## Usage See README.md for full documentation.

path: README.md
content: # nano-gpt-plugin

NanoGPT provider plugin for OpenClaw

## Features

- Dynamic model catalog from `https://nano-gpt.com/api/v1/models?detailed=true`
- Auto-populates model capabilities (vision, reasoning, context window, pricing)
- Handles `NANOGPT_API_KEY` environment variable
- Provides `openclaw onboard --nano-gpt-api-key <key>` flow
- Fix usage tracking by adding include_usage: true to all outgoing requests.
- Subscription usage tracking via `/api/subscription/v1/usage`
- Balance checking via `/api/check-balance`
- Supports all NanoGPT model families: OpenAI, Anthropic, Google, xAI, DeepSeek, Moonshot, Qwen, Groq, and 50+ more

## Installation

### From npm (if published)

```bash
npm install @openclaw/nano-gpt
```

### Local development

Clone this repository and link it:

```bash
git clone <this-repo>
cd nano-gpt-plugin
npm install
npm run build
```

Then, in your OpenClaw workspace, you can use the plugin by referencing the built `dist` directory.

## Usage

### Onboarding

To add your NanoGPT API key:

```bash
openclaw onboard --nano-gpt-api-key <your-key>
```

This will store the key in your OpenClaw configuration.

### Using models

Once onboarded, you can use any model from NanoGPT by referencing it with the `nano-gpt/` prefix:

```bash
openclaw chat --model nano-gpt/openai/gpt-5.2 "Hello, world!"
```

Or in your agent configuration:

```json
{
  "model": "nano-gpt/anthropic/claude-opus-4.6"
}
```

### Usage and balance

To check your usage and balance:

```bash
openclaw status
```

This will show your daily/monthly token usage and remaining balance.

## Configuration

The plugin does not require any additional configuration beyond the API key.

## Development

### Building

```bash
npm run build
```

### Testing

```bash
npm test
```

### Linting

(If you add a linter)

```bash
npm run lint
```

## License

MIT


path: docs/00-research-notes.md
content: # Research Notes — nano-gpt plugin

## What we know
- NanoGPT is a model aggregator with OpenAI-compatible API
- Base URL: https://nano-gpt.com/api/v1
- Auth: Bearer token (`sk-nano-<uuid>`) in `Authorization` header
- Model catalog: `GET /api/v1/models?detailed=true` (auth optional but gives user-specific pricing)
- Usage: `GET /api/subscription/v1/usage` (auth required)
- Balance: `POST /api/check-balance` (auth required)
- Existing OpenClaw integration is manual JSON config only (no plugin)
- 50+ model families: OpenAI, Anthropic, Google, xAI, Groq, DeepSeek, Moonshot, Qwen, etc.

## Model ID format in nano-gpt
- Format: `provider/model-id` e.g. `anthropic/claude-opus-4.6`, `openai/gpt-5.2`
- NanoGPT uses `/` in model IDs — OpenClaw provider format is `nano-gpt/anthropic/claude-opus-4.6`

## API compatibility
- Standard OpenAI `/v1/chat/completions` — compatible with `api: "openai-completions"`
- No special headers needed beyond `Authorization: Bearer`
- Streaming via SSE — same as OpenAI

## Capabilities from detailed model list
```
capabilities.vision              → input: ["text","image"]
capabilities.reasoning          → reasoning: true
pricing.prompt                  → cost.input ($/M tokens)
pricing.completion               → cost.output ($/M tokens)
context_length                  → contextWindow
max_output_tokens               → maxTokens
```

## Key SDK hooks needed
1. `catalog` (async) — fetch and map model list
2. `resolveDynamicModel` — accept arbitrary model refs
3. `resolveUsageAuth` — pass Bearer token
4. `fetchUsageSnapshot` — GET /api/subscription/v1/usage

## Alternative domains (good to know)
- ai.bitcoin.com
- bcashgpt.com
- cake.nano-gpt.com
(Only base URL changes, model IDs and endpoints the same)


path: src/index.ts
content: export { default } from "./provider";

Security scan verdicts — ClawScan: clean | static analysis: suspicious | VirusTotal: clean | SkillSpector: suspicious (HIGH)