# DeepAPI agent setup

You are an AI agent. Your human sent you here to set up DeepAPI on this
machine — this hosted file replaces pasting the full setup prompt, which is
hard on VPS and remote-desktop machines. Follow the prompt below exactly as
if your human had pasted it into this chat.

This file is public, so it cannot contain the one thing the prompt needs:
the API key.

1. Ask your human for their DeepAPI API key (it starts with `dapi_`). They
   can create one at https://deepapi.co/api-keys and read it there.
2. In the prompt below, replace `<paste the one-time API key here>` with
   that key.

---

You are my coding agent. Set up DeepAPI globally on this machine, so it works in every project and every future session.

Credentials:
DEEPAPI_API_BASE_URL=https://deepapi.co
DEEPAPI_API_KEY=<paste the one-time API key here>

Do this:
1. Install on the machine where you run. If you can reach both a local and a remote machine (SSH, remote-execution tools), run `hostname` and ask me which machine to set up BEFORE installing anything.
2. Detect the current OS and shell, then run exactly ONE matching official installer — each takes seconds:
   - Windows PowerShell:
     $installer = Invoke-RestMethod "https://deepapi.co/install.ps1"; & ([scriptblock]::Create([string]$installer)) -BaseUrl "https://deepapi.co" -ApiKey "<paste the one-time API key here>"
   - macOS/Linux bash or zsh:
     curl -fsSL https://deepapi.co/install.sh | DEEPAPI_API_BASE_URL="https://deepapi.co" DEEPAPI_API_KEY="<paste the one-time API key here>" bash
   Do not hand-translate either installer into another shell.
3. The installer handles everything — credentials, the global `deepapi` skill, its local updater, agent memory — and ends with a smoke test.
4. After it succeeds, re-check credentials in THIS session. Only if they are still missing, load them: PowerShell: `. "$HOME/.deepapi/env.ps1"`; bash/zsh: `source ~/.deepapi/env`.
5. Confirm the skill reached this machine: read `$HOME/.agents/skills/deepapi/VERSION.txt` with your own file tools. If it is missing, the installer ran on the wrong machine — re-run it here.
6. If it fails, read the error, fix it, and re-run — installers are idempotent. Setup is complete only when the smoke test status is `succeeded`.
7. Never expose DEEPAPI_API_KEY anywhere — not in code, files, or logs.
8. Check the current balance with `GET https://deepapi.co/v1/balance`. End with a short confirmation: the machine you installed on (its hostname), the skill version, the smoke test result, remaining balance, the top-up link `https://deepapi.co/credits`, that I can stay right here in this chat, and a few things I could ask you next.

Stop and ask before sending email or spending more than the explicit customer spend cap.
