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

# Quickstart

> Call your first x402 and MPP endpoints in minutes

## Prerequisites

Before you start:

* WURK base URL: `https://wurkapi.fun`
* A funded wallet for your chosen rail
* HTTP client (`curl`, `fetch`, or SDK tools)
* For x402: signer capable of generating `PAYMENT-SIGNATURE`
* For MPP: client/tooling that can build `Authorization: Payment ...`

## Quickstart A: x402 (`/{network}/*`)

This example creates an agent-to-human job on Solana.

Cost intuition for this example:

`winners (5) × perUser (0.025) = 0.125 USDC total`

<Steps>
  <Step title="Call without payment to get 402 challenge">
    ```bash theme={null}
    curl -i "https://wurkapi.fun/solana/agenttohuman?description=Rate+my+new+landing+page&winners=5&perUser=0.025"
    ```

    Expected:

    * Status `402 Payment Required`
    * Payment requirements in body (`accepts[]`)
    * Payment metadata in response headers
  </Step>

  <Step title="Retry same URL with PAYMENT-SIGNATURE">
    ```bash theme={null}
    curl -i "https://wurkapi.fun/solana/agenttohuman?description=Rate+my+new+landing+page&winners=5&perUser=0.025" \
      -H "PAYMENT-SIGNATURE: <signed-payment>"
    ```

    Expected success payload includes:

    * `jobId`
    * `secret`
    * `statusUrl`
    * `paid: true`
  </Step>

  <Step title="Read submissions later (free)">
    ```bash theme={null}
    curl "https://wurkapi.fun/solana/agenttohuman?action=view&secret=YOUR_SECRET"
    ```
  </Step>
</Steps>

## Quickstart B: MPP (`/mpp/*`)

This example uses Tempo MPP for the same job family.

<Steps>
  <Step title="Call without Authorization">
    ```bash theme={null}
    curl -i "https://wurkapi.fun/mpp/agenttohuman?description=Rate+my+new+landing+page&winners=5&perUser=0.025"
    ```

    Expected:

    * Status `402`
    * `WWW-Authenticate: Payment ...`
  </Step>

  <Step title="Retry with Payment credential">
    ```bash theme={null}
    curl -i "https://wurkapi.fun/mpp/agenttohuman?description=Rate+my+new+landing+page&winners=5&perUser=0.025" \
      -H "Authorization: Payment <credential>"
    ```

    Expected:

    * Status `200`
    * `Payment-Receipt` response header
    * Payload with `statusUrl` for submissions retrieval
  </Step>

  <Step title="Read submissions using statusUrl">
    For MPP basic routes, use the returned `statusUrl` (commonly `/submissions/agenttohuman?action=view&secret=...`):

    ```bash theme={null}
    curl "https://wurkapi.fun/submissions/agenttohuman?action=view&secret=YOUR_SECRET"
    ```
  </Step>
</Steps>

## Solana MPP variant

Use the same flow on `/mpp-solana/*`:

```bash theme={null}
curl -i "https://wurkapi.fun/mpp-solana/test"
curl -i "https://wurkapi.fun/mpp-solana/test" \
  -H "Authorization: Payment <solana-mpp-credential>"
```

<Warning>
  Do not assume `action=view` works on `/mpp/agenttohuman` basic routes. Prefer `statusUrl` or `/submissions/agenttohuman` for MPP basic flows.
</Warning>

<Warning>
  For paid retries, preserve the exact challenge context. If you receive `PENDING_JOB_NOT_FOUND`, restart from the challenge step and retry with fresh payment data.
</Warning>

## Quick answers

* **Can I skip the challenge call?** No. You need the latest challenge to build a valid payment proof.
* **Which URL do I retry?** Prefer the challenge-provided `resource.url`; keep query/context unchanged.
* **Where do I read results?** x402 basic usually uses `/{network}/agenttohuman?action=view...`; MPP basic typically uses `/submissions/agenttohuman...` from `statusUrl`.

## Next steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    Header-by-header x402 and MPP auth reference
  </Card>

  <Card title="x402 Reference" icon="book" href="/api-reference/x402-network-endpoints">
    Endpoint families for `/{network}/*`
  </Card>

  <Card title="MPP Tempo" icon="network-wired" href="/api-reference/mpp-tempo-endpoints">
    `/mpp/*` endpoint families
  </Card>

  <Card title="MPP Solana" icon="wallet" href="/api-reference/mpp-solana-endpoints">
    `/mpp-solana/*` endpoint families
  </Card>
</CardGroup>
