> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getmillwork.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Check your setup

> Check your API key and retrieve a receipt without calling a provider.

**Goal:** Send one safe test request.

**You are done when:** the run reaches `completed` and its receipt confirms the
Echo platform path with no selected model arm.

This check uses Echo mode. It tests authentication, submission, status, and
receipt retrieval without calling an external AI provider.

## Before you begin

* Your organization is approved for the private preview.
* You created an organization API key in the dashboard.
* You have `curl` and `jq`.

```bash theme={null}
export MILLWORK_API_URL="https://api.getmillwork.dev/v1"
export MILLWORK_API_KEY="<organization API key>"
```

## 1. Submit the test

```bash theme={null}
curl --fail-with-body \
  --request POST \
  --header "Authorization: Bearer $MILLWORK_API_KEY" \
  --header "Idempotency-Key: echo-$(date +%s)" \
  --header "Content-Type: application/json" \
  --data '{
    "mode": "echo",
    "task": { "objective": "Check the Millwork API lifecycle." },
    "policy": {
      "data_classes": ["public"],
      "budget": { "max_cost_usd": 1, "max_runtime_s": 30 }
    }
  }' \
  "$MILLWORK_API_URL/executions" | tee echo.json

EXECUTION_ID="$(jq -r '.execution_id' echo.json)"
```

The response includes the run ID and links for status, events, and the receipt.
The API field for a run is `execution`.

## 2. Check the status

```bash theme={null}
curl --fail-with-body \
  --header "Authorization: Bearer $MILLWORK_API_KEY" \
  "$MILLWORK_API_URL/executions/$EXECUTION_ID" | tee echo-status.json

jq '.status' echo-status.json
```

Echo should reach `completed` immediately. If it does not, check the returned
error before retrying.

## 3. Read the receipt

```bash theme={null}
curl --fail-with-body \
  --header "Authorization: Bearer $MILLWORK_API_KEY" \
  "$MILLWORK_API_URL/receipts/$EXECUTION_ID" | tee echo-receipt.json
```

Check the fields that identify the Echo path:

```bash theme={null}
jq '{
  status,
  mode,
  selected_arm: .slices[0].route.selected_arm,
  ranking: .slices[0].route.ranking,
  eligible: .slices[0].route.eligible,
  fallback_chain: .slices[0].route.fallback_chain
}' echo-receipt.json

jq -e '
  .status == "completed" and
  .mode == "echo" and
  ((.slices | length) == 1) and
  (.slices[0].route.selected_arm == null) and
  (.slices[0].route.ranking == "skipped_platform_proof") and
  (.slices[0].route.eligible == []) and
  (.slices[0].route.fallback_chain == [])
' echo-receipt.json >/dev/null && echo "Echo lifecycle check passed."
```

These fields confirm that Millwork used its Echo platform proof and did not
select a model arm or provider route.

## What success looks like

* status is `completed`;
* receipt mode is `echo`;
* `selected_arm` is `null`;
* ranking is `skipped_platform_proof`; and
* the eligible and fallback lists are empty.

<CardGroup cols={2}>
  <Card title="Run a model" icon="play" href="/get-started/builder">
    Get model output and confirm which provider answered.
  </Card>

  <Card title="Fix a failed call" icon="life-buoy" href="/guides/errors-and-retries">
    Find the error code and the next action.
  </Card>
</CardGroup>
