Skip to content

Quickstart

This guide walks you through creating your first Wrapd endpoint.

Create an account at wrapd.sh using your email. You’ll receive a magic link to log in.

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}

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...

Create a wrapd.yaml file:

version: 1
endpoints:
- 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: 10
Terminal window
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:latest

The agent will connect to Wrapd and register your endpoints automatically.

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...

Terminal window
# JSON response
curl 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
}
Terminal window
# Streaming SSE response
curl -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.