Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.45.0"
".": "2.46.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 271
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-356010b9b9fd6228b457b8fcfa376cf4928a8f3bd4728e7ba5e4b6b5ef4f5843.yml
openapi_spec_hash: 885864ae98a443166f585f856c464fb2
config_hash: 1f1e3b4050e2cb4bc780ce0b70e2b3e6
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-ae4c1a92306e31f05678c3de72efbf1903b5c09924dacd42a555cc5ccc0e5eb1.yml
openapi_spec_hash: 0973932f9a3f0b46a0933b143878f9fe
config_hash: b40012963b4619be8229fcca0105b627
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 2.46.0 (2026-07-13)

Full Changelog: [v2.45.0...v2.46.0](https://github.com/openai/openai-python/compare/v2.45.0...v2.46.0)

### Features

* **api:** add owner_project_access to APIKeyListParams ([f589d04](https://github.com/openai/openai-python/commit/f589d04bf9f377ecb1f54335ab3ab9d825b5dfee))

## 2.45.0 (2026-07-09)

Full Changelog: [v2.44.0...v2.45.0](https://github.com/openai/openai-python/compare/v2.44.0...v2.45.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "openai"
version = "2.45.0"
version = "2.46.0"
description = "The official Python library for the openai API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/openai/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "openai"
__version__ = "2.45.0" # x-release-please-version
__version__ = "2.46.0" # x-release-please-version
18 changes: 18 additions & 0 deletions src/openai/resources/admin/organization/projects/api_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from __future__ import annotations

from typing_extensions import Literal

import httpx

from ..... import _legacy_response
Expand Down Expand Up @@ -89,6 +91,7 @@ def list(
*,
after: str | Omit = omit,
limit: int | Omit = omit,
owner_project_access: Literal["active", "inactive", "any"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -108,6 +111,12 @@ def list(
limit: A limit on the number of objects to be returned. Limit can range between 1 and
100, and the default is 20.

owner_project_access: Filter API keys by whether the owner currently has effective access to the
project. Use `active` for owners with access, `inactive` for owners without
access, or `any` for all enabled project API keys. If omitted, the endpoint
applies its existing membership-based visibility rules, which may exclude some
enabled keys.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -130,6 +139,7 @@ def list(
{
"after": after,
"limit": limit,
"owner_project_access": owner_project_access,
},
api_key_list_params.APIKeyListParams,
),
Expand Down Expand Up @@ -256,6 +266,7 @@ def list(
*,
after: str | Omit = omit,
limit: int | Omit = omit,
owner_project_access: Literal["active", "inactive", "any"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -275,6 +286,12 @@ def list(
limit: A limit on the number of objects to be returned. Limit can range between 1 and
100, and the default is 20.

owner_project_access: Filter API keys by whether the owner currently has effective access to the
project. Use `active` for owners with access, `inactive` for owners without
access, or `any` for all enabled project API keys. If omitted, the endpoint
applies its existing membership-based visibility rules, which may exclude some
enabled keys.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -297,6 +314,7 @@ def list(
{
"after": after,
"limit": limit,
"owner_project_access": owner_project_access,
},
api_key_list_params.APIKeyListParams,
),
Expand Down
1 change: 0 additions & 1 deletion src/openai/resources/webhooks/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ from openai.types.webhooks import (
ResponseCompletedWebhookEvent,
ResponseFailedWebhookEvent,
ResponseIncompleteWebhookEvent,
SafetyIdentifierBlockedWebhookEvent,
UnwrapWebhookEvent,
)
```
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing_extensions import TypedDict
from typing_extensions import Literal, TypedDict

__all__ = ["APIKeyListParams"]

Expand All @@ -22,3 +22,12 @@ class APIKeyListParams(TypedDict, total=False):

Limit can range between 1 and 100, and the default is 20.
"""

owner_project_access: Literal["active", "inactive", "any"]
"""
Filter API keys by whether the owner currently has effective access to the
project. Use `active` for owners with access, `inactive` for owners without
access, or `any` for all enabled project API keys. If omitted, the endpoint
applies its existing membership-based visibility rules, which may exclude some
enabled keys.
"""
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,8 @@ class ProjectAPIKey(BaseModel):

owner: Owner

owner_project_access: Literal["active", "inactive"]
"""Whether the API key's owner currently has effective access to the project."""

redacted_value: str
"""The redacted value of the API key"""
7 changes: 4 additions & 3 deletions src/openai/types/beta/beta_response_reasoning_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ class BetaResponseReasoningItem(BaseModel):
"""Reasoning text content."""

encrypted_content: Optional[str] = None
"""
The encrypted content of the reasoning item - populated when a response is
generated with `reasoning.encrypted_content` in the `include` parameter.
"""The encrypted content of the reasoning item.

This is populated by default for reasoning items returned by
`POST /v1/responses` and WebSocket `response.create` requests.
"""

status: Optional[Literal["in_progress", "completed", "incomplete"]] = None
Expand Down
7 changes: 4 additions & 3 deletions src/openai/types/beta/beta_response_reasoning_item_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ class BetaResponseReasoningItemParam(TypedDict, total=False):
"""Reasoning text content."""

encrypted_content: Optional[str]
"""
The encrypted content of the reasoning item - populated when a response is
generated with `reasoning.encrypted_content` in the `include` parameter.
"""The encrypted content of the reasoning item.
This is populated by default for reasoning items returned by
`POST /v1/responses` and WebSocket `response.create` requests.
"""

status: Literal["in_progress", "completed", "incomplete"]
Expand Down
7 changes: 4 additions & 3 deletions src/openai/types/responses/response_reasoning_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ class ResponseReasoningItem(BaseModel):
"""Reasoning text content."""

encrypted_content: Optional[str] = None
"""
The encrypted content of the reasoning item - populated when a response is
generated with `reasoning.encrypted_content` in the `include` parameter.
"""The encrypted content of the reasoning item.
This is populated by default for reasoning items returned by
`POST /v1/responses` and WebSocket `response.create` requests.
"""

status: Optional[Literal["in_progress", "completed", "incomplete"]] = None
Expand Down
7 changes: 4 additions & 3 deletions src/openai/types/responses/response_reasoning_item_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ class ResponseReasoningItemParam(TypedDict, total=False):
"""Reasoning text content."""

encrypted_content: Optional[str]
"""
The encrypted content of the reasoning item - populated when a response is
generated with `reasoning.encrypted_content` in the `include` parameter.
"""The encrypted content of the reasoning item.
This is populated by default for reasoning items returned by
`POST /v1/responses` and WebSocket `response.create` requests.
"""

status: Literal["in_progress", "completed", "incomplete"]
Expand Down
3 changes: 0 additions & 3 deletions src/openai/types/webhooks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,3 @@
from .fine_tuning_job_succeeded_webhook_event import (
FineTuningJobSucceededWebhookEvent as FineTuningJobSucceededWebhookEvent,
)
from .safety_identifier_blocked_webhook_event import (
SafetyIdentifierBlockedWebhookEvent as SafetyIdentifierBlockedWebhookEvent,
)

This file was deleted.

2 changes: 0 additions & 2 deletions src/openai/types/webhooks/unwrap_webhook_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from .realtime_call_incoming_webhook_event import RealtimeCallIncomingWebhookEvent
from .fine_tuning_job_cancelled_webhook_event import FineTuningJobCancelledWebhookEvent
from .fine_tuning_job_succeeded_webhook_event import FineTuningJobSucceededWebhookEvent
from .safety_identifier_blocked_webhook_event import SafetyIdentifierBlockedWebhookEvent

__all__ = ["UnwrapWebhookEvent"]

Expand All @@ -40,7 +39,6 @@
ResponseCompletedWebhookEvent,
ResponseFailedWebhookEvent,
ResponseIncompleteWebhookEvent,
SafetyIdentifierBlockedWebhookEvent,
],
PropertyInfo(discriminator="type"),
]
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def test_method_list_with_all_params(self, client: OpenAI) -> None:
project_id="project_id",
after="after",
limit=0,
owner_project_access="active",
)
assert_matches_type(SyncConversationCursorPage[ProjectAPIKey], api_key, path=["response"])

Expand Down Expand Up @@ -228,6 +229,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOpenAI) -> N
project_id="project_id",
after="after",
limit=0,
owner_project_access="active",
)
assert_matches_type(AsyncConversationCursorPage[ProjectAPIKey], api_key, path=["response"])

Expand Down
Loading