# API reference

Base URL: `https://api.thinqit.ai`. Contract version 1.0.0, rendered from [openapi.yaml](https://thinqit.ai/openapi.yaml).

## Decisions

Ask typed questions about a state.

- [Answer typed questions about a state](https://thinqit.ai/docs/api/decide/): `POST /v1/decide`

## Models

Aliases and exact model versions, with their limits and published quality.

- [List model aliases and exact versions](https://thinqit.ai/docs/api/listModels/): `GET /v1/models`

## Account

The calling API key, and the usage and balance of its account.

- [The API key making this call](https://thinqit.ai/docs/api/getCurrentKey/): `GET /v1/key`
- [Usage for one API key over a date range](https://thinqit.ai/docs/api/getUsage/): `GET /v1/usage`
- [Current prepaid balance and price tier](https://thinqit.ai/docs/api/getBalance/): `GET /v1/balance`

## Console auth

Sign-in for the web console. Console routes use a session cookie, not an API key.

- [Email a one-time sign-in code](https://thinqit.ai/docs/api/requestSignInCode/): `POST /v1/console/auth/email-code`
- [Exchange a sign-in code for a session](https://thinqit.ai/docs/api/createSession/): `POST /v1/console/auth/session`
- [Sign out](https://thinqit.ai/docs/api/deleteSession/): `DELETE /v1/console/auth/session`

## Console keys

Create, list, change and revoke API keys.

- [List API keys](https://thinqit.ai/docs/api/listKeys/): `GET /v1/console/keys`
- [Create an API key](https://thinqit.ai/docs/api/createKey/): `POST /v1/console/keys`
- [Read one API key](https://thinqit.ai/docs/api/getKey/): `GET /v1/console/keys/{key_id}`
- [Rename a key, change its scopes or lower its limits](https://thinqit.ai/docs/api/updateKey/): `PATCH /v1/console/keys/{key_id}`
- [Revoke an API key](https://thinqit.ai/docs/api/revokeKey/): `DELETE /v1/console/keys/{key_id}`

## Console billing

Account profile and prepaid balance top-ups through Stripe Checkout.

- [Account profile, balance and settings](https://thinqit.ai/docs/api/getAccount/): `GET /v1/console/account`
- [Start a Stripe Checkout top-up](https://thinqit.ai/docs/api/createCheckoutSession/): `POST /v1/console/checkout-sessions`

## Console usage

Account-wide usage series for the console charts.

- [Account usage as a time series](https://thinqit.ai/docs/api/getUsageSeries/): `GET /v1/console/usage/series`

## Console playground

Run decisions from the console in test mode.

- [Run a decision from the console in test mode](https://thinqit.ai/docs/api/playgroundDecide/): `POST /v1/console/playground/decide`
