> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jiekou.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> JieKou AI model APIs are OpenAI-compatible. Base URL for users in mainland China (direct, no VPN): https://api.highwayapi.ai/openai; elsewhere: https://api.jiekou.ai/openai. Anthropic-compatible base URL: https://api.highwayapi.ai/anthropic or https://api.jiekou.ai/anthropic.
> Authenticate with `Authorization: Bearer <API_KEY>`; with Anthropic SDKs or Claude Code, pass the same key as `ANTHROPIC_AUTH_TOKEN`. Users create keys at https://jiekou.ai/settings/key-management. Never print or hardcode a real key.
> Get current model IDs from GET https://api.jiekou.ai/openai/v1/models instead of reusing model names from memory.

# Pi

## What is Pi?

Pi is a minimalist, hackable terminal AI coding agent, originally created by Mario Zechner (badlogic) and now maintained by Earendil Works. Its official slogan is "Make Pi adapt to your workflow, not the other way around." Give it a goal and a working directory, and it can read files, run commands, edit code, and drive multi-step tasks forward. The default core is deliberately kept minimal — no built-in sub-agents, plan mode, permission prompts, or background bash — with those capabilities instead left to TypeScript extensions, Skills, prompt templates, and themes.

Pi supports more than 15 model providers and hundreds of models, and you can switch between them at any point in a session. Sessions are stored as a tree structure: `/tree`, `/fork`, and `/clone` let you return to any historical node and start a new branch from there, and you can export sessions as HTML or generate share links. Its context engineering is the core selling point: a minimal system prompt, AGENTS.md project instructions, customizable auto-compaction, and Skills loaded on demand. The runtime supports an interactive TUI, print/JSON script mode, RPC, and a TypeScript SDK. The project is MIT-licensed, but it explicitly ships without a built-in permission system and runs with the launching user's permissions by default, so it is recommended to use it inside a container or sandbox.

Official website: [https://pi.dev/](https://pi.dev/)

GitHub: [https://github.com/earendil-works/pi](https://github.com/earendil-works/pi)

With the API service provided by Interface AI, you can call the world's leading large models in Pi and seamlessly integrate them into your Pi workflow.

## How to Connect Interface AI to Pi?

### Get an API Key

1. Go to the official website jiekou.ai and sign up.

2. Enter the management console, click "My Account" in the upper right corner, and select "API Key Management" from the dropdown list.

   ![](https://mintcdn.com/jiekou/woskTYHkYOH0CRpH/images/pi-01.png?fit=max\&auto=format\&n=woskTYHkYOH0CRpH\&q=85\&s=76cb5c9c851a0f8b9c947169fbce3eee)

3. Click "Create" and enter a name for the key. We recommend choosing a name that is easy to recognize, so you can later distinguish keys for different purposes in the console.

   ![](https://mintcdn.com/jiekou/woskTYHkYOH0CRpH/images/pi-02.png?fit=max\&auto=format\&n=woskTYHkYOH0CRpH\&q=85\&s=5cd1d23cad28bb10d53902bcc0be70d0)

4. Click to copy and record the generated key. It cannot be viewed again in the console, so please store it safely for future use.

### Connect Interface AI to Pi

Create `.pi\agent\models.json` with the following format and fill in the corresponding information:

```json theme={null}
{
  "$schema": "https://pi.dev/schemas/models.schema.json",
  "providers": {
    "highway": {
      "name": "Jiekou",
      "baseUrl": "https://api.highwayapi.ai/openai/v1",
      "api": "openai-completions",
      "apiKey": "Your API Key",
      "models": [
        {
          "id": "claude-opus-5-5",
          "name": "Claude Opus 5.5",
          "reasoning": true,
          "input": ["text", "image"],
          "contextWindow": 1000000,
          "maxTokens": 128000,
          "cost": { "input": 4, "output": 20, "cacheRead": 0.2, "cacheWrite": 5 }
        }
      ]
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.