# Quickstart — your first request in 5 minutes

> Sign up, create a free test key and calculate real road distance and drive time with cURL, JavaScript, Python, Go, PHP, Ruby, Java or Dart.

Source: https://www.wayline.cloud/docs/quickstart

This guide takes you from zero to a successful `200 OK` response from the Distance API. You need a terminal or any language runtime; no SDK install is required.

### Create an account

[Sign up](https://app.wayline.cloud/signup) with your work email. New accounts receive free request units. API keys unlock after your first card payment on the **Billing** page.

### Create a test key

In the dashboard open **API keys → Create key**, choose **Test**, and copy the key. It starts with `wl_test_` and is shown **only once**. Test keys are free, never billed, and have a daily cap.

Store it in an environment variable so it never ends up in your code:

```bash
export WAYLINE_API_KEY="wl_test_..."
```

### Make your first request

Calculate the road distance and drive time between two points. Coordinates are **`lat,lng`** — latitude first, like Google Maps.

### Read the response

- `distance_meters` / `distance_miles` — driving distance along the road network.
- `duration_seconds` — estimated drive time (free-flow; no live traffic).
- `origin.snapped` / `destination.snapped` — where each point was snapped onto the road, and `distance_to_road_meters` shows how far it moved.
- `region` and `map_version` — which dataset answered, for reproducibility.
- `units_charged` — billable units (always `1` for distance). Test keys are never billed.

Got an error instead? Every error has a `code` and a `docs_url`. The most common first-request issues:

| Code | Likely cause |
|---|---|
| `INVALID_API_KEY` | The header is missing or the key was copied incompletely. Use `Authorization: Bearer $WAYLINE_API_KEY`. |
| `OUT_OF_COVERAGE` | A point is outside every enabled region — or lat and lng are swapped. Check [Coverage](/coverage). |
| `TEST_KEY_LIMIT_REACHED` | The test key's daily cap is used up. Wait for the UTC reset or use a live key. |

### Go live

When you are ready for production:

1. Add a payment method on the **Billing** page (usage beyond free units is billed monthly in arrears via Paddle).
2. Create a **Live** key (`wl_live_…`) and store it in your secrets manager.
3. Restrict the key by server IP range or, for browser use, by allowed origin. See [Key security](/docs/concepts/key-security).
4. Optionally set a monthly spend limit.
5. Add retries with backoff for `429` and `5xx`. See [Errors & retries](/docs/concepts/errors-and-retries).

## Next steps

<CardLinks links={[
  { href: "/docs/sdks", title: "Use an SDK", description: "Retries, timeouts and typed errors in 8 languages." },
  { href: "/docs/guides/delivery-radius", title: "Build a delivery-radius checker", description: "Filter locations by drive time with the matrix endpoint." },
  { href: "/docs/api", title: "API reference", description: "Every endpoint, parameter and response field." },
  { href: "/docs/concepts/units-and-pricing", title: "Units & pricing", description: "What each request costs." },
]} />
