Quickstart
This guide walks you through creating your first Wrapd endpoint.
1. Sign up
Section titled “1. Sign up”Create an account at wrapd.sh using your email. You’ll receive a magic link to log in.
2. Set a username
Section titled “2. Set a username”After logging in, you’ll be prompted to choose a username. This becomes part of your endpoint URLs:
https://api.wrapd.sh/v1/{username}/{endpoint}3. Create an agent token
Section titled “3. Create an agent token”In the setup flow, create an agent token. Copy and save it — you won’t be able to see it again.
The token looks like: wrapd_at_a1b2c3d4e5f6...
4. Write your config
Section titled “4. Write your config”Create a wrapd.yaml file:
version: 1endpoints: - name: hello method: GET description: "Returns a greeting" command: echo args: - name: name required: false default: "world" timeout: 30
- name: disk-usage method: GET description: "Returns disk usage" command: df args: - name: flags required: false default: "-h" timeout: 105. Run the agent
Section titled “5. Run the agent”docker run -d --name wrapd-agent \ -e WRAPD_TOKEN="your_token_here" \ -v $(pwd)/wrapd.yaml:/app/wrapd.yaml \ -w /app \ ghcr.io/wrapd/agent:latestThe agent will connect to Wrapd and register your endpoints automatically.
6. Create an API key
Section titled “6. Create an API key”Go to API Keys in the dashboard and create a key. This is what callers use to authenticate.
The key looks like: wrapd_sk_a1b2c3d4e5f6...
7. Call your endpoint
Section titled “7. Call your endpoint”# JSON responsecurl https://api.wrapd.sh/v1/yourname/hello \ -H "X-API-Key: wrapd_sk_your_key" \ -H "Accept: application/json"{ "output": "hello world", "exit_code": 0}# Streaming SSE responsecurl -N https://api.wrapd.sh/v1/yourname/hello \ -H "X-API-Key: wrapd_sk_your_key"data: {"type":"output","data":"hello world"}
data: {"type":"done","exit_code":0,"duration_ms":42}That’s it. Your CLI command is now an API.