Docs/ AI Assistant/ Getting Started

AI Getting Started

Four steps to go from zero to a working AI assistant that knows your server inside and out.

Step 1: Purchase AI Credits

Navigate to sh0.dev/account/ai and purchase a credit pack. Packs are available in five sizes:

PackApprox. Conversations (Sonnet)
$5~1,000
$10~2,000
$25~5,000
$50~10,000
$100~20,000

All three Claude models (Haiku, Sonnet, Opus) are available on every plan. Credits never expire -- use them whenever you need.

Step 2: Create an AI API Key

On the same account page, under AI API Keys, give the key a name and click Create key. Your key starts with sh0_ai_ and is displayed only once.

Warning
Copy your API key immediately after generation. It cannot be retrieved later. If you lose it, revoke it and generate a new one.

This key pays for the assistant; it carries no permission level. What the assistant can do on your server is what you can do: its tools run in your dashboard session, with your role. A viewer gets a read-only assistant. To give an external MCP client a limited access, use a scoped API key of your server instead (see MCP server).

Step 3: Configure Your Dashboard

Open your sh0 dashboard and navigate to Settings. In the AI section, paste your sh0_ai_ key.

The key is kept in your browser's localStorage. The dashboard sends it, with each message, to the sh0 AI gateway (https://sh0.dev/api/ai), which checks your credits and forwards the conversation to the model.

Note
Where your conversations go: each message and its context pass through the sh0 AI gateway on their way to the model; the gateway keeps the text of each answer for up to 24 hours so that a reply survives a lost connection. Your conversation history is saved on your sh0 server (and in your browser), where you can archive or delete it.

Step 4: Start Chatting

Open /ai in your dashboard. The AI automatically detects your server context -- running apps, resource metrics, sh0 version, and configuration. No manual setup required.

Type a question or command in natural language. The assistant will determine which tools to call, execute them against your server, and return the results with its analysis.

Choosing a Model

Select the model from the dropdown in the chat interface. Each model has different strengths:

ModelSpeedCost/ConversationRecommended For
Haiku~1-2s~$0.002Quick status checks, listing apps, simple questions
Sonnet~3-5s~$0.005Debugging failed deploys, multi-step operations, daily driver
Opus~8-15s~$0.009Complex root-cause analysis, architecture review, sandbox code analysis
Tip
Start with Sonnet for most tasks. Switch to Haiku for quick queries where speed matters more than depth, and to Opus when you need thorough analysis of complex problems.

Example Conversations

Here are some things you can ask the AI assistant:

  • "Why did my last deploy fail?" -- The AI fetches deploy logs, identifies the error, and suggests a fix.
  • "List all my apps and their status" -- Calls list_apps and presents a summary table.
  • "Generate a sh0.yaml for my Node.js project" -- Creates a deployment configuration based on best practices.
  • "Check if my database is reachable from my-app" -- Uses the sandbox to test network connectivity between containers.
  • "My app is using too much memory. Help me debug it." -- Checks metrics, inspects logs, and may analyze code in the sandbox.
  • "Restart my-api and watch the logs" -- Restarts the app and streams the startup logs to verify it comes back healthy.
  • "What changed in the last deploy of frontend?" -- Reviews deploy history and build logs to summarize changes.

BYOK (Bring Your Own Key)

Business plan users can bypass the credit system entirely by providing their own LLM API key. This gives you zero-markup pricing -- you pay the provider directly at their published rates.

Supported key formats:

  • Anthropic -- Keys starting with sk-ant-. Direct access to Claude models.
  • OpenRouter -- Keys starting with sk-or-. Access to Claude and other models via OpenRouter's unified API.

To configure BYOK, open your sh0.dev account page, section Bring Your Own Key (BYOK), paste your provider key and click Save.

Note
Your provider key is stored on your sh0.dev account, encrypted (AES-256-GCM). The sh0 AI gateway decrypts it to call the provider on your behalf: requests still go through the gateway, which adds your server context and the tool definitions. Remove the key from the same page to stop using it.