---
title: "Check Openai Key Status"
method: GET
path: "/api/v1/workspaces/{workspace_id}/openai-key-status"
tags: ["workspaces"]
---

# Check Openai Key Status

`GET /api/v1/workspaces/{workspace_id}/openai-key-status`

## Request

- Base URL: `https://memory.kagura-ai.com` (the document declares no server; this is the origin it was published from)
- URL: `https://memory.kagura-ai.com/api/v1/workspaces/{workspace_id}/openai-key-status`
- Auth: none declared

Check if workspace has valid OpenAI API key.

Issue #181: OpenAI API key guidance in context creation.

Returns status about whether workspace has an enabled OpenAI API key,
and whether current user has permissions to configure it.

Args:
    workspace_id: Workspace ID
    request: HTTP request
    db: Database session

Returns:
    OpenAIKeyStatusResponse with has_key, can_configure, external_keys_url

Raises:
    HTTPException 403: User not member of workspace

## Path parameters

- `workspace_id` string, uuid, required

## Response `200`

Successful Response

- OpenAIKeyStatusResponse: OpenAI API key status for workspace. Issue #181: OpenAI API key guidance in context creation.
  - `has_key` boolean, required: Whether workspace has OpenAI API key
  - `can_configure` boolean, required: Whether current user can configure keys
  - `external_keys_url` string, required: URL to external keys configuration page
  - `embedding_available` boolean: Whether embeddings can actually be generated for this workspace — own key OR the platform credential. Use this for availability warnings; use has_key only to describe the workspace's own keys.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud.md) · [All operations](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud/llms.txt) · [OpenAPI document](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud/revisions/09f17f5ada29?raw)
