Home / Servers / OpenAI API / update_project_api_key

Update project API key

An MCP tool from the OpenAI API server, hosted on mcp.hjlabs.in.

Update project API key Updates the scopes and/or expiration of an existing API key in the project, including a service-account-owned key. Requires permission to write project API keys. Provide at least one of scopes or… [POST /organization/projects/{project_id}/api_keys/{api_key_id}]

Name on the gateway: openai_api__update_project_api_key · may change things.

Parameters

NameTypeDescription
project_id requiredstringThe ID of the project.
api_key_id requiredstringThe ID of the API key.
expires_in_secondsintegerNumber of seconds from this request until the API key expires. Must comply…
scopesarrayReplace the API key scope restrictions. Omit to leave scopes unchanged. An…

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "openai_api__update_project_api_key",
  "arguments": {
    "project_id": "…",
    "api_key_id": "…"
  }
}

Or connect the OpenAI API server directly, which lists 371 tools including this one:

Run in your terminal
claude mcp add --transport http hj-openai-api https://mcp.hjlabs.in/mcp/openai-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the update project api key tool with project_id set to ….

More from OpenAI API