{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/codai-ro/json-schema/codai-ro-connect-key-response-schema.json",
  "title": "Connect key response",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/codai-ro-auth-openapi.yml#/components/schemas/ConnectKeyResponse",
  "type": "object",
  "required": [
    "api_key",
    "api_key_id",
    "base_url",
    "model",
    "already_issued"
  ],
  "properties": {
    "api_key": {
      "type": [
        "string",
        "null"
      ],
      "description": "Plaintext key, returned **only once** per grant (`null` afterwards). Store it sealed."
    },
    "api_key_id": {
      "type": "string",
      "format": "uuid",
      "description": "Stable id of the minted key (revocable from the console)."
    },
    "base_url": {
      "type": "string",
      "format": "uri",
      "const": "https://ai.codai.ro/v1",
      "description": "OpenAI-compatible base URL to use the key against."
    },
    "model": {
      "type": "string",
      "const": "codai"
    },
    "already_issued": {
      "type": "boolean",
      "description": "`true` when the plaintext was already handed out on an earlier call."
    }
  }
}