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

# API reference

> The customer endpoints, the base URL, and the spec you can download.

These pages are the customer operations. Start with the [quickstart](/quickstart) if you have not sent a decision yet. Each operation below has its request and response schema, and you can try it with your own key.

<CardGroup cols={2}>
  <Card title="Download OpenAPI spec" icon="download" href="https://console.sqwish.ai/openapi.json">
    The spec the service serves at `/openapi.json`. It includes operator routes that this tab leaves out.
  </Card>

  <Card title="Move from Jev" icon="arrow-right" href="/guides/jev-migration">
    Keep a Jev client. Change the address and the key. The path stays `/v1/systemone`.
  </Card>
</CardGroup>

| | |
| - | - |
| Base URL | `https://console.sqwish.ai` |
| Auth | `Authorization: Bearer` on every customer call except the public playground, the linter, recipes, and the Jev translator. Create a key in the console. It is shown once. |
| Content type | `application/json`. Dataset and labelling uploads use `application/x-ndjson`. |
| Charge | A successful decision includes `charge`. A replay of the same `Idempotency-Key` and body is not charged again. Rules for failures are in [API behavior](/api#what-does-this-status-code-mean). |

## The API at a glance

Most integrations call `POST /v1/decide`. The other customer routes are in the sidebar.

<Columns cols={3}>
  <Card title="1. You send" icon="arrow-up-from-line">
    A context and one or more decisions. Each decision has an id, a kind, and the outcomes you define.
  </Card>

  <Card title="2. D1 scores it" icon="sparkles">
    `POST /v1/decide`. One call, one context. The model returns a probability for every outcome.
  </Card>

  <Card title="3. You get" icon="list-check">
    `probabilities` and `action`. Check `model` and `fallback` to see which model answered.
  </Card>
</Columns>

<Card title="POST /v1/decide" icon="play" href="/api-reference/decisions/run-decisions">
  **Start here.** Score the outcomes you defined. Read `action`. Send an abstention to review.
</Card>

<CardGroup cols={2}>
  <Card title="POST /v1/decide/estimate" icon="calculator" href="/api-reference/decisions/estimate-billable-input-and-maximum-cost-without-executing">
    The maximum cost before you run it. No inference and no charge.
  </Card>

  <Card title="POST /v1/playground/decide" icon="flask" href="/api-reference/decisions/try-a-decision">
    A base model with no account. At most eight decisions, and nothing is stored.
  </Card>

  <Card title="GET /v1/models" icon="box" href="/api-reference/models/list-models">
    The models your key can call, and whether each one is ready.
  </Card>

  <Card title="POST /v1/systemone" icon="arrow-right-arrow-left" href="/api-reference/decisions/run-jev-decisions">
    The Jev request shape. Change the address and the key. See [Move from Jev](/guides/jev-migration).
  </Card>
</CardGroup>

Retries, idempotency, and the size limits are in [API behavior](/api).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.