{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ditto-audio/json-schema/ditto-audio-create-api-key-dto-schema.json",
  "title": "CreateApiKeyDto",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ditto-audio-api-keys-api-openapi.yml#/components/schemas/CreateApiKeyDto",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 80,
      "description": "Your label for the key."
    },
    "scopes": {
      "type": "array",
      "description": "Defaults to every scope. `audio:speech`: synthesize (POST /v1/audio/speech, /speech/batch, /batches and a batch's /cancel). `audio:read`: GET /v1/audio/voices, /voices/{id}, and reading batches (GET /v1/audio/batches, /{id}, /{id}/items, /{id}/output). `reader:read` / `reader:write`: read or change audiobooks under /v1/reader. GET /v1/audio/languages and /v1/audio/format need no key.",
      "items": {
        "type": "string",
        "enum": [
          "audio:speech",
          "audio:read",
          "reader:read",
          "reader:write"
        ]
      }
    },
    "expiresAt": {
      "type": "string",
      "description": "ISO-8601 expiry. Omit for a key that never expires."
    }
  },
  "required": [
    "name"
  ]
}