---
title: "Create Scoped Jwt"
method: POST
path: "/v1/scoped-jwt"
tags: ["Authentication"]
---

# Create Scoped Jwt

`POST /v1/scoped-jwt`

## Headers

- `xi-api-key` string, nullable
- `x-api-key` string, nullable

## Request body

- ScopedJWTIn
  - `api_key_name` string, required
  - `models` string[], nullable — allow inference only to the specified model names
  - `expires_delta` integer, nullable — how many seconds in the future should the token be valid for
  - `expires_at` integer, nullable — unix timestamp when the token should expire
  - `spending_limit` number, nullable — only allow spending that much USD until the token becomes invalid

## Response `200`

Successful Response

- ScopedJWTOut
  - `token` string, required — The newly minted scoped JWT ready for use

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/deepinfra/apis/deepinfra-api.md) · [All operations](https://skmtc.net/deepinfra/apis/deepinfra-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deepinfra/deepinfra-api/revisions/79ff347d29e2/schema)
