Skip to main content
These examples use the direct API host, https://api.nano-gpt.com. It has no IPv6 address, so clients with only IPv6 should use https://nano-gpt.com with the same paths. See API Hosts.

Using goose with NanoGPT

goose connects to OpenAI-compatible services through a custom provider file. Save the file below and goose lists NanoGPT like any other provider.

Setup

  1. Get your API key from nano-gpt.com/api.
  2. Save this file as nanogpt.json in goose’s custom_providers directory:
    • macOS and Linux: ~/.config/goose/custom_providers/
    • Windows: %APPDATA%\Block\goose\config\custom_providers\
  3. Set your key and start goose with the NanoGPT provider:
    To run a single prompt instead of a session:

Adding models

Add any NanoGPT text model to the models list. goose needs tool calling, so pick models whose capabilities.tool_calling is true. GET /api/v1/models?detailed=true returns that flag and each model’s context_length; set context_limit to that value or lower. This file was checked with goose 1.61.1. goose sends its requests, including its tool definitions, to /api/v1/chat/completions with your key as a Bearer token.