{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scale-ai/json-schema/scale-ai-create-apikey-response-schema.json",
  "title": "CreateAPIKeyResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scale-ai-agent-apikeys-api-openapi.yml#/components/schemas/CreateAPIKeyResponse",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id",
      "description": "The unique identifier of the agent API key."
    },
    "agent_id": {
      "type": "string",
      "title": "Agent Id",
      "description": "The UUID of the agent"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At",
      "description": "When the agent API key was created"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Name",
      "description": "The optional name of the agent API key."
    },
    "api_key_type": {
      "$ref": "#/$defs/AgentAPIKeyType",
      "description": "The type of the created agent API key (external)."
    },
    "api_key": {
      "type": "string",
      "title": "Api Key",
      "description": "The value of the newly created API key."
    }
  },
  "type": "object",
  "required": [
    "id",
    "agent_id",
    "created_at",
    "name",
    "api_key_type",
    "api_key"
  ],
  "$defs": {
    "AgentAPIKeyType": {
      "type": "string",
      "enum": [
        "internal",
        "external",
        "github",
        "slack"
      ],
      "title": "AgentAPIKeyType"
    }
  }
}