---
title: "Current Key"
method: GET
path: "/v1/keys/current"
tags: ["keys"]
---

# Current Key

`GET /v1/keys/current`

## Request

- Base URL: `https://api.craterview.ai`
- URL: `https://api.craterview.ai/v1/keys/current`
- Auth: HTTP bearer

The key this request is made with, as the listing describes it.

For finding your own key's id and name without paging the listing for it — to label a
replacement the same, or to know which id not to revoke.

## Response `200`

Successful Response

- KeyInfo: One key on the account. Never the key itself — see `NewKey` for the one response that carries a usable value.
  - `id` string, required: Identifies this key, for revoking it. Not the key itself.
  - `prefix` string, required: The first few characters, which identify a key without authorizing anything. It is what a listing can show and what to match against your own records.
  - `name` string, required: The label given when it was created.
  - `created_at` string, nullable: When the key was issued. ISO-8601, UTC.
  - `revoked_at` string, nullable: When this key stopped working; absent while it still works. A revoked key is kept so a listing can explain a client that started failing.
  - `rate_limit_per_minute` integer, required: Requests a minute this key may make before it is throttled.
  - `current` boolean, required: Whether this is the key that authenticated this request. It cannot be revoked by id while it is the one you are calling with; `DELETE /v1/keys/current` ends it on request, unless it is the account's only way back in.

## Other responses

- `400`: the path, query or a JSON string in the body contains a NUL character or an unpaired surrogate; the body is not JSON encoded as UTF-8, or carries a number JSON cannot represent (NaN, Infinity, or one too large) or nesting too deep to read; or an Idempotency-Key header is longer than 255 characters or not printable ASCII. The request was not read
- `401`: missing, malformed or unrecognised API key
- `404`: the key you are calling with no longer reaches an account
- `413`: the request body is larger than 1 MiB. The request was not read

---

[API](https://skmtc.dev/craterview/apis/craterview-ai-api.md) · [All operations](https://skmtc.dev/craterview/apis/craterview-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/craterview/apis/craterview-ai-api/revisions/9419a5cd27cd?raw)
