SIGN IN SIGN UP
openai / openai-python UNCLAIMED

The official Python library for the OpenAI API

30349 0 0 Python
# Shared Types
```python
from openai.types import (
AllModels,
ChatModel,
ComparisonFilter,
CompoundFilter,
CustomToolInputFormat,
ErrorObject,
FunctionDefinition,
FunctionParameters,
Metadata,
Reasoning,
ReasoningEffort,
ResponseFormatJSONObject,
ResponseFormatJSONSchema,
ResponseFormatText,
ResponseFormatTextGrammar,
ResponseFormatTextPython,
ResponsesModel,
)
```
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
# Completions
Types:
```python
from openai.types import Completion, CompletionChoice, CompletionUsage
```
Methods:
- <code title="post /completions">client.completions.<a href="./src/openai/resources/completions.py">create</a>(\*\*<a href="src/openai/types/completion_create_params.py">params</a>) -> <a href="./src/openai/types/completion.py">Completion</a></code>
# Chat
Types:
```python
from openai.types import ChatModel
```
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
## Completions
Types:
```python
from openai.types.chat import (
ChatCompletion,
ChatCompletionAllowedToolChoice,
ChatCompletionAssistantMessageParam,
ChatCompletionAudio,
ChatCompletionAudioParam,
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
ChatCompletionChunk,
ChatCompletionContentPart,
ChatCompletionContentPartImage,
ChatCompletionContentPartInputAudio,
ChatCompletionContentPartRefusal,
ChatCompletionContentPartText,
ChatCompletionCustomTool,
ChatCompletionDeleted,
ChatCompletionDeveloperMessageParam,
ChatCompletionFunctionCallOption,
ChatCompletionFunctionMessageParam,
ChatCompletionFunctionTool,
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
ChatCompletionMessage,
ChatCompletionMessageCustomToolCall,
ChatCompletionMessageFunctionToolCall,
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
ChatCompletionMessageParam,
ChatCompletionMessageToolCallUnion,
ChatCompletionModality,
ChatCompletionNamedToolChoice,
ChatCompletionNamedToolChoiceCustom,
ChatCompletionPredictionContent,
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
ChatCompletionRole,
ChatCompletionStoreMessage,
ChatCompletionStreamOptions,
ChatCompletionSystemMessageParam,
ChatCompletionTokenLogprob,
ChatCompletionToolUnion,
ChatCompletionToolChoiceOption,
ChatCompletionToolMessageParam,
ChatCompletionUserMessageParam,
ChatCompletionAllowedTools,
ChatCompletionReasoningEffort,
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
)
```
Methods:
- <code title="post /chat/completions">client.chat.completions.<a href="./src/openai/resources/chat/completions/completions.py">create</a>(\*\*<a href="src/openai/types/chat/completion_create_params.py">params</a>) -> <a href="./src/openai/types/chat/chat_completion.py">ChatCompletion</a></code>
- <code title="get /chat/completions/{completion_id}">client.chat.completions.<a href="./src/openai/resources/chat/completions/completions.py">retrieve</a>(completion_id) -> <a href="./src/openai/types/chat/chat_completion.py">ChatCompletion</a></code>
- <code title="post /chat/completions/{completion_id}">client.chat.completions.<a href="./src/openai/resources/chat/completions/completions.py">update</a>(completion_id, \*\*<a href="src/openai/types/chat/completion_update_params.py">params</a>) -> <a href="./src/openai/types/chat/chat_completion.py">ChatCompletion</a></code>
- <code title="get /chat/completions">client.chat.completions.<a href="./src/openai/resources/chat/completions/completions.py">list</a>(\*\*<a href="src/openai/types/chat/completion_list_params.py">params</a>) -> <a href="./src/openai/types/chat/chat_completion.py">SyncCursorPage[ChatCompletion]</a></code>
- <code title="delete /chat/completions/{completion_id}">client.chat.completions.<a href="./src/openai/resources/chat/completions/completions.py">delete</a>(completion_id) -> <a href="./src/openai/types/chat/chat_completion_deleted.py">ChatCompletionDeleted</a></code>
### Messages
Methods:
- <code title="get /chat/completions/{completion_id}/messages">client.chat.completions.messages.<a href="./src/openai/resources/chat/completions/messages.py">list</a>(completion_id, \*\*<a href="src/openai/types/chat/completions/message_list_params.py">params</a>) -> <a href="./src/openai/types/chat/chat_completion_store_message.py">SyncCursorPage[ChatCompletionStoreMessage]</a></code>
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
# Embeddings
Types:
```python
from openai.types import CreateEmbeddingResponse, Embedding, EmbeddingModel
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
```
Methods:
- <code title="post /embeddings">client.embeddings.<a href="./src/openai/resources/embeddings.py">create</a>(\*\*<a href="src/openai/types/embedding_create_params.py">params</a>) -> <a href="./src/openai/types/create_embedding_response.py">CreateEmbeddingResponse</a></code>
# Files
Types:
```python
from openai.types import FileContent, FileDeleted, FileObject, FilePurpose
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
```
Methods:
- <code title="post /files">client.files.<a href="./src/openai/resources/files.py">create</a>(\*\*<a href="src/openai/types/file_create_params.py">params</a>) -> <a href="./src/openai/types/file_object.py">FileObject</a></code>
- <code title="get /files/{file_id}">client.files.<a href="./src/openai/resources/files.py">retrieve</a>(file_id) -> <a href="./src/openai/types/file_object.py">FileObject</a></code>
- <code title="get /files">client.files.<a href="./src/openai/resources/files.py">list</a>(\*\*<a href="src/openai/types/file_list_params.py">params</a>) -> <a href="./src/openai/types/file_object.py">SyncCursorPage[FileObject]</a></code>
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
- <code title="delete /files/{file_id}">client.files.<a href="./src/openai/resources/files.py">delete</a>(file_id) -> <a href="./src/openai/types/file_deleted.py">FileDeleted</a></code>
- <code title="get /files/{file_id}/content">client.files.<a href="./src/openai/resources/files.py">content</a>(file_id) -> HttpxBinaryResponseContent</code>
2025-01-30 15:28:16 +00:00
- <code title="get /files/{file_id}/content">client.files.<a href="./src/openai/resources/files.py">retrieve_content</a>(file_id) -> <a href="./src/openai/types/file_content.py">str</a></code>
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
# Images
Types:
```python
2025-07-16 16:24:53 +00:00
from openai.types import (
Image,
ImageEditCompletedEvent,
ImageEditPartialImageEvent,
ImageEditStreamEvent,
ImageGenCompletedEvent,
ImageGenPartialImageEvent,
ImageGenStreamEvent,
ImageModel,
ImagesResponse,
)
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
```
Methods:
- <code title="post /images/variations">client.images.<a href="./src/openai/resources/images.py">create_variation</a>(\*\*<a href="src/openai/types/image_create_variation_params.py">params</a>) -> <a href="./src/openai/types/images_response.py">ImagesResponse</a></code>
- <code title="post /images/edits">client.images.<a href="./src/openai/resources/images.py">edit</a>(\*\*<a href="src/openai/types/image_edit_params.py">params</a>) -> <a href="./src/openai/types/images_response.py">ImagesResponse</a></code>
- <code title="post /images/generations">client.images.<a href="./src/openai/resources/images.py">generate</a>(\*\*<a href="src/openai/types/image_generate_params.py">params</a>) -> <a href="./src/openai/types/images_response.py">ImagesResponse</a></code>
# Audio
Types:
```python
from openai.types import AudioModel, AudioResponseFormat
```
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
## Transcriptions
Types:
```python
from openai.types.audio import (
Transcription,
TranscriptionDiarized,
TranscriptionDiarizedSegment,
TranscriptionInclude,
TranscriptionSegment,
TranscriptionStreamEvent,
TranscriptionTextDeltaEvent,
TranscriptionTextDoneEvent,
TranscriptionTextSegmentEvent,
TranscriptionVerbose,
TranscriptionWord,
TranscriptionCreateResponse,
)
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
```
Methods:
- <code title="post /audio/transcriptions">client.audio.transcriptions.<a href="./src/openai/resources/audio/transcriptions.py">create</a>(\*\*<a href="src/openai/types/audio/transcription_create_params.py">params</a>) -> <a href="./src/openai/types/audio/transcription_create_response.py">TranscriptionCreateResponse</a></code>
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
## Translations
Types:
```python
from openai.types.audio import Translation, TranslationVerbose, TranslationCreateResponse
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
```
Methods:
- <code title="post /audio/translations">client.audio.translations.<a href="./src/openai/resources/audio/translations.py">create</a>(\*\*<a href="src/openai/types/audio/translation_create_params.py">params</a>) -> <a href="./src/openai/types/audio/translation_create_response.py">TranslationCreateResponse</a></code>
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
## Speech
Types:
```python
from openai.types.audio import SpeechModel
```
Methods:
- <code title="post /audio/speech">client.audio.speech.<a href="./src/openai/resources/audio/speech.py">create</a>(\*\*<a href="src/openai/types/audio/speech_create_params.py">params</a>) -> HttpxBinaryResponseContent</code>
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
# Moderations
Types:
```python
from openai.types import (
Moderation,
ModerationImageURLInput,
ModerationModel,
ModerationMultiModalInput,
ModerationTextInput,
ModerationCreateResponse,
)
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
```
Methods:
- <code title="post /moderations">client.moderations.<a href="./src/openai/resources/moderations.py">create</a>(\*\*<a href="src/openai/types/moderation_create_params.py">params</a>) -> <a href="./src/openai/types/moderation_create_response.py">ModerationCreateResponse</a></code>
# Models
Types:
```python
from openai.types import Model, ModelDeleted
```
Methods:
- <code title="get /models/{model}">client.models.<a href="./src/openai/resources/models.py">retrieve</a>(model) -> <a href="./src/openai/types/model.py">Model</a></code>
- <code title="get /models">client.models.<a href="./src/openai/resources/models.py">list</a>() -> <a href="./src/openai/types/model.py">SyncPage[Model]</a></code>
- <code title="delete /models/{model}">client.models.<a href="./src/openai/resources/models.py">delete</a>(model) -> <a href="./src/openai/types/model_deleted.py">ModelDeleted</a></code>
# FineTuning
## Methods
Types:
```python
from openai.types.fine_tuning import (
DpoHyperparameters,
DpoMethod,
ReinforcementHyperparameters,
ReinforcementMethod,
SupervisedHyperparameters,
SupervisedMethod,
)
```
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
## Jobs
Types:
```python
2024-04-15 15:05:04 -04:00
from openai.types.fine_tuning import (
FineTuningJob,
FineTuningJobEvent,
FineTuningJobWandbIntegration,
FineTuningJobWandbIntegrationObject,
FineTuningJobIntegration,
2024-04-15 15:05:04 -04:00
)
```
Methods:
- <code title="post /fine_tuning/jobs">client.fine_tuning.jobs.<a href="./src/openai/resources/fine_tuning/jobs/jobs.py">create</a>(\*\*<a href="src/openai/types/fine_tuning/job_create_params.py">params</a>) -> <a href="./src/openai/types/fine_tuning/fine_tuning_job.py">FineTuningJob</a></code>
- <code title="get /fine_tuning/jobs/{fine_tuning_job_id}">client.fine_tuning.jobs.<a href="./src/openai/resources/fine_tuning/jobs/jobs.py">retrieve</a>(fine_tuning_job_id) -> <a href="./src/openai/types/fine_tuning/fine_tuning_job.py">FineTuningJob</a></code>
- <code title="get /fine_tuning/jobs">client.fine_tuning.jobs.<a href="./src/openai/resources/fine_tuning/jobs/jobs.py">list</a>(\*\*<a href="src/openai/types/fine_tuning/job_list_params.py">params</a>) -> <a href="./src/openai/types/fine_tuning/fine_tuning_job.py">SyncCursorPage[FineTuningJob]</a></code>
- <code title="post /fine_tuning/jobs/{fine_tuning_job_id}/cancel">client.fine_tuning.jobs.<a href="./src/openai/resources/fine_tuning/jobs/jobs.py">cancel</a>(fine_tuning_job_id) -> <a href="./src/openai/types/fine_tuning/fine_tuning_job.py">FineTuningJob</a></code>
- <code title="get /fine_tuning/jobs/{fine_tuning_job_id}/events">client.fine_tuning.jobs.<a href="./src/openai/resources/fine_tuning/jobs/jobs.py">list_events</a>(fine_tuning_job_id, \*\*<a href="src/openai/types/fine_tuning/job_list_events_params.py">params</a>) -> <a href="./src/openai/types/fine_tuning/fine_tuning_job_event.py">SyncCursorPage[FineTuningJobEvent]</a></code>
- <code title="post /fine_tuning/jobs/{fine_tuning_job_id}/pause">client.fine_tuning.jobs.<a href="./src/openai/resources/fine_tuning/jobs/jobs.py">pause</a>(fine_tuning_job_id) -> <a href="./src/openai/types/fine_tuning/fine_tuning_job.py">FineTuningJob</a></code>
- <code title="post /fine_tuning/jobs/{fine_tuning_job_id}/resume">client.fine_tuning.jobs.<a href="./src/openai/resources/fine_tuning/jobs/jobs.py">resume</a>(fine_tuning_job_id) -> <a href="./src/openai/types/fine_tuning/fine_tuning_job.py">FineTuningJob</a></code>
2024-04-15 15:05:04 -04:00
### Checkpoints
Types:
```python
from openai.types.fine_tuning.jobs import FineTuningJobCheckpoint
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
```
Methods:
2024-04-15 15:05:04 -04:00
- <code title="get /fine_tuning/jobs/{fine_tuning_job_id}/checkpoints">client.fine_tuning.jobs.checkpoints.<a href="./src/openai/resources/fine_tuning/jobs/checkpoints.py">list</a>(fine_tuning_job_id, \*\*<a href="src/openai/types/fine_tuning/jobs/checkpoint_list_params.py">params</a>) -> <a href="./src/openai/types/fine_tuning/jobs/fine_tuning_job_checkpoint.py">SyncCursorPage[FineTuningJobCheckpoint]</a></code>
V1 (#677) * cleanup * v1.0.0-beta.1 * docs: add basic manual azure example * docs: use chat completions instead of completions for demo example * test: rename `API_BASE_URL` to `TEST_API_BASE_URL` * feat(client): handle retry-after header with a date format * feat(api): remove `content_filter` stop_reason and update documentation * refactor(cli): rename internal types for improved auto complete * feat(client): add forwards-compatible pydantic methods * feat(api): move `n_epochs` under `hyperparameters` * feat(client): add support for passing in a httpx client * chore: update README * feat(cli): use http/2 if h2 is available * chore(docs): remove trailing spaces * feat(client): add logging setup * chore(internal): minor updates * v1.0.0-beta.2 * docs: use chat completions instead of completions for demo example * chore: add case insensitive get header function * fix(client): correctly handle errors during streaming * fix(streaming): add additional overload for ambiguous stream param * chore(internal): enable lint rule * chore(internal): cleanup some redundant code * fix(client): accept io.IOBase instances in file params * docs: improve error message for invalid file param type * 1.0.0-beta.3 * chore(internal): migrate from Poetry to Rye * feat(cli): add `tools fine_tunes.prepare_data` * feat(client): support passing httpx.URL instances to base_url * chore(internal): fix some latent type errors * feat(api): add embeddings encoding_format * feat: use numpy for faster embeddings decoding * chore(internal): bump pyright * chore(internal): bump deps * feat(client): improve file upload types * feat(client): adjust retry behavior to be exponential backoff * ci: add lint workflow * docs: improve to dictionary example * ci(lint): run ruff too * chore(internal): require explicit overrides * feat(client): support accessing raw response objects * test(qs): add an additional test case for array brackets * feat(client): add dedicated Azure client * feat(package): add classifiers * docs(readme): add Azure guide * 1.0.0-rc1 * docs: small cleanup * feat(github): include a devcontainer setup * chore: improve type names * feat(client): allow binary returns * feat(client): support passing BaseModels to request params at runtime * fix(binaries): don't synchronously block in astream_to_file * 1.0.0-rc2 * chore(internal): remove unused int/float conversion * docs(readme): improve example snippets * fix: prevent TypeError in Python 3.8 (ABC is not subscriptable) * 1.0.0-rc3 * docs: update streaming example * docs(readme): update opening * v1.0.0 --------- Co-authored-by: Robert Craigie <robert@craigie.dev> Co-authored-by: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Co-authored-by: Stainless Bot <dev@stainlessapi.com> Co-authored-by: Alex Rattray <rattray.alex@gmail.com>
2023-11-06 08:19:00 -08:00
## Checkpoints
### Permissions
Types:
```python
from openai.types.fine_tuning.checkpoints import (
PermissionCreateResponse,
PermissionRetrieveResponse,
2026-03-04 16:41:18 +00:00
PermissionListResponse,
PermissionDeleteResponse,
)
```
Methods:
- <code title="post /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions">client.fine_tuning.checkpoints.permissions.<a href="./src/openai/resources/fine_tuning/checkpoints/permissions.py">create</a>(fine_tuned_model_checkpoint, \*\*<a href="src/openai/types/fine_tuning/checkpoints/permission_create_params.py">params</a>) -> <a href="./src/openai/types/fine_tuning/checkpoints/permission_create_response.py">SyncPage[PermissionCreateResponse]</a></code>
- <code title="get /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions">client.fine_tuning.checkpoints.permissions.<a href="./src/openai/resources/fine_tuning/checkpoints/permissions.py">retrieve</a>(fine_tuned_model_checkpoint, \*\*<a href="src/openai/types/fine_tuning/checkpoints/permission_retrieve_params.py">params</a>) -> <a href="./src/openai/types/fine_tuning/checkpoints/permission_retrieve_response.py">PermissionRetrieveResponse</a></code>
2026-03-04 16:41:18 +00:00
- <code title="get /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions">client.fine_tuning.checkpoints.permissions.<a href="./src/openai/resources/fine_tuning/checkpoints/permissions.py">list</a>(fine_tuned_model_checkpoint, \*\*<a href="src/openai/types/fine_tuning/checkpoints/permission_list_params.py">params</a>) -> <a href="./src/openai/types/fine_tuning/checkpoints/permission_list_response.py">SyncConversationCursorPage[PermissionListResponse]</a></code>
- <code title="delete /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions/{permission_id}">client.fine_tuning.checkpoints.permissions.<a href="./src/openai/resources/fine_tuning/checkpoints/permissions.py">delete</a>(permission_id, \*, fine_tuned_model_checkpoint) -> <a href="./src/openai/types/fine_tuning/checkpoints/permission_delete_response.py">PermissionDeleteResponse</a></code>
## Alpha
### Graders
Types:
```python
from openai.types.fine_tuning.alpha import GraderRunResponse, GraderValidateResponse
```
Methods:
- <code title="post /fine_tuning/alpha/graders/run">client.fine_tuning.alpha.graders.<a href="./src/openai/resources/fine_tuning/alpha/graders.py">run</a>(\*\*<a href="src/openai/types/fine_tuning/alpha/grader_run_params.py">params</a>) -> <a href="./src/openai/types/fine_tuning/alpha/grader_run_response.py">GraderRunResponse</a></code>
- <code title="post /fine_tuning/alpha/graders/validate">client.fine_tuning.alpha.graders.<a href="./src/openai/resources/fine_tuning/alpha/graders.py">validate</a>(\*\*<a href="src/openai/types/fine_tuning/alpha/grader_validate_params.py">params</a>) -> <a href="./src/openai/types/fine_tuning/alpha/grader_validate_response.py">GraderValidateResponse</a></code>
# Graders
## GraderModels
Types:
```python
from openai.types.graders import (
GraderInputs,
LabelModelGrader,
MultiGrader,
PythonGrader,
ScoreModelGrader,
StringCheckGrader,
TextSimilarityGrader,
)
```
# VectorStores
Types:
```python
from openai.types import (
AutoFileChunkingStrategyParam,
FileChunkingStrategy,
FileChunkingStrategyParam,
OtherFileChunkingStrategyObject,
StaticFileChunkingStrategy,
StaticFileChunkingStrategyObject,
StaticFileChunkingStrategyObjectParam,
VectorStore,
VectorStoreDeleted,
VectorStoreSearchResponse,
)
```
Methods:
- <code title="post /vector_stores">client.vector_stores.<a href="./src/openai/resources/vector_stores/vector_stores.py">create</a>(\*\*<a href="src/openai/types/vector_store_create_params.py">params</a>) -> <a href="./src/openai/types/vector_store.py">VectorStore</a></code>
- <code title="get /vector_stores/{vector_store_id}">client.vector_stores.<a href="./src/openai/resources/vector_stores/vector_stores.py">retrieve</a>(vector_store_id) -> <a href="./src/openai/types/vector_store.py">VectorStore</a></code>
- <code title="post /vector_stores/{vector_store_id}">client.vector_stores.<a href="./src/openai/resources/vector_stores/vector_stores.py">update</a>(vector_store_id, \*\*<a href="src/openai/types/vector_store_update_params.py">params</a>) -> <a href="./src/openai/types/vector_store.py">VectorStore</a></code>
- <code title="get /vector_stores">client.vector_stores.<a href="./src/openai/resources/vector_stores/vector_stores.py">list</a>(\*\*<a href="src/openai/types/vector_store_list_params.py">params</a>) -> <a href="./src/openai/types/vector_store.py">SyncCursorPage[VectorStore]</a></code>
- <code title="delete /vector_stores/{vector_store_id}">client.vector_stores.<a href="./src/openai/resources/vector_stores/vector_stores.py">delete</a>(vector_store_id) -> <a href="./src/openai/types/vector_store_deleted.py">VectorStoreDeleted</a></code>
- <code title="post /vector_stores/{vector_store_id}/search">client.vector_stores.<a href="./src/openai/resources/vector_stores/vector_stores.py">search</a>(vector_store_id, \*\*<a href="src/openai/types/vector_store_search_params.py">params</a>) -> <a href="./src/openai/types/vector_store_search_response.py">SyncPage[VectorStoreSearchResponse]</a></code>
## Files
Types:
```python
from openai.types.vector_stores import VectorStoreFile, VectorStoreFileDeleted, FileContentResponse
```
Methods:
- <code title="post /vector_stores/{vector_store_id}/files">client.vector_stores.files.<a href="./src/openai/resources/vector_stores/files.py">create</a>(vector_store_id, \*\*<a href="src/openai/types/vector_stores/file_create_params.py">params</a>) -> <a href="./src/openai/types/vector_stores/vector_store_file.py">VectorStoreFile</a></code>
- <code title="get /vector_stores/{vector_store_id}/files/{file_id}">client.vector_stores.files.<a href="./src/openai/resources/vector_stores/files.py">retrieve</a>(file_id, \*, vector_store_id) -> <a href="./src/openai/types/vector_stores/vector_store_file.py">VectorStoreFile</a></code>
- <code title="post /vector_stores/{vector_store_id}/files/{file_id}">client.vector_stores.files.<a href="./src/openai/resources/vector_stores/files.py">update</a>(file_id, \*, vector_store_id, \*\*<a href="src/openai/types/vector_stores/file_update_params.py">params</a>) -> <a href="./src/openai/types/vector_stores/vector_store_file.py">VectorStoreFile</a></code>
- <code title="get /vector_stores/{vector_store_id}/files">client.vector_stores.files.<a href="./src/openai/resources/vector_stores/files.py">list</a>(vector_store_id, \*\*<a href="src/openai/types/vector_stores/file_list_params.py">params</a>) -> <a href="./src/openai/types/vector_stores/vector_store_file.py">SyncCursorPage[VectorStoreFile]</a></code>
- <code title="delete /vector_stores/{vector_store_id}/files/{file_id}">client.vector_stores.files.<a href="./src/openai/resources/vector_stores/files.py">delete</a>(file_id, \*, vector_store_id) -> <a href="./src/openai/types/vector_stores/vector_store_file_deleted.py">VectorStoreFileDeleted</a></code>
- <code title="get /vector_stores/{vector_store_id}/files/{file_id}/content">client.vector_stores.files.<a href="./src/openai/resources/vector_stores/files.py">content</a>(file_id, \*, vector_store_id) -> <a href="./src/openai/types/vector_stores/file_content_response.py">SyncPage[FileContentResponse]</a></code>
## FileBatches
Types:
```python
from openai.types.vector_stores import VectorStoreFileBatch
```
Methods:
- <code title="post /vector_stores/{vector_store_id}/file_batches">client.vector_stores.file_batches.<a href="./src/openai/resources/vector_stores/file_batches.py">create</a>(vector_store_id, \*\*<a href="src/openai/types/vector_stores/file_batch_create_params.py">params</a>) -> <a href="./src/openai/types/vector_stores/vector_store_file_batch.py">VectorStoreFileBatch</a></code>
- <code title="get /vector_stores/{vector_store_id}/file_batches/{batch_id}">client.vector_stores.file_batches.<a href="./src/openai/resources/vector_stores/file_batches.py">retrieve</a>(batch_id, \*, vector_store_id) -> <a href="./src/openai/types/vector_stores/vector_store_file_batch.py">VectorStoreFileBatch</a></code>
- <code title="post /vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel">client.vector_stores.file_batches.<a href="./src/openai/resources/vector_stores/file_batches.py">cancel</a>(batch_id, \*, vector_store_id) -> <a href="./src/openai/types/vector_stores/vector_store_file_batch.py">VectorStoreFileBatch</a></code>
- <code title="get /vector_stores/{vector_store_id}/file_batches/{batch_id}/files">client.vector_stores.file_batches.<a href="./src/openai/resources/vector_stores/file_batches.py">list_files</a>(batch_id, \*, vector_store_id, \*\*<a href="src/openai/types/vector_stores/file_batch_list_files_params.py">params</a>) -> <a href="./src/openai/types/vector_stores/vector_store_file.py">SyncCursorPage[VectorStoreFile]</a></code>
# [Webhooks](src/openai/resources/webhooks/api.md)
# Beta
## ChatKit
Types:
```python
2025-10-17 17:33:05 +00:00
from openai.types.beta import ChatKitWorkflow
```
### Sessions
Methods:
- <code title="post /chatkit/sessions">client.beta.chatkit.sessions.<a href="./src/openai/resources/beta/chatkit/sessions.py">create</a>(\*\*<a href="src/openai/types/beta/chatkit/session_create_params.py">params</a>) -> <a href="./src/openai/types/beta/chatkit/chat_session.py">ChatSession</a></code>
- <code title="post /chatkit/sessions/{session_id}/cancel">client.beta.chatkit.sessions.<a href="./src/openai/resources/beta/chatkit/sessions.py">cancel</a>(session_id) -> <a href="./src/openai/types/beta/chatkit/chat_session.py">ChatSession</a></code>
### Threads
Types:
```python
from openai.types.beta.chatkit import (
ChatSession,
ChatSessionAutomaticThreadTitling,
ChatSessionChatKitConfiguration,
ChatSessionChatKitConfigurationParam,
ChatSessionExpiresAfterParam,
ChatSessionFileUpload,
ChatSessionHistory,
ChatSessionRateLimits,
ChatSessionRateLimitsParam,
ChatSessionStatus,
ChatSessionWorkflowParam,
ChatKitAttachment,
ChatKitResponseOutputText,
ChatKitThread,
ChatKitThreadAssistantMessageItem,
ChatKitThreadItemList,
ChatKitThreadUserMessageItem,
ChatKitWidgetItem,
ThreadDeleteResponse,
)
```
Methods:
- <code title="get /chatkit/threads/{thread_id}">client.beta.chatkit.threads.<a href="./src/openai/resources/beta/chatkit/threads.py">retrieve</a>(thread_id) -> <a href="./src/openai/types/beta/chatkit/chatkit_thread.py">ChatKitThread</a></code>
- <code title="get /chatkit/threads">client.beta.chatkit.threads.<a href="./src/openai/resources/beta/chatkit/threads.py">list</a>(\*\*<a href="src/openai/types/beta/chatkit/thread_list_params.py">params</a>) -> <a href="./src/openai/types/beta/chatkit/chatkit_thread.py">SyncConversationCursorPage[ChatKitThread]</a></code>
- <code title="delete /chatkit/threads/{thread_id}">client.beta.chatkit.threads.<a href="./src/openai/resources/beta/chatkit/threads.py">delete</a>(thread_id) -> <a href="./src/openai/types/beta/chatkit/thread_delete_response.py">ThreadDeleteResponse</a></code>
- <code title="get /chatkit/threads/{thread_id}/items">client.beta.chatkit.threads.<a href="./src/openai/resources/beta/chatkit/threads.py">list_items</a>(thread_id, \*\*<a href="src/openai/types/beta/chatkit/thread_list_items_params.py">params</a>) -> SyncConversationCursorPage[Data]</code>
## Assistants
Types:
```python
from openai.types.beta import (
Assistant,
AssistantDeleted,
AssistantStreamEvent,
AssistantTool,
CodeInterpreterTool,
2024-04-17 12:35:22 -04:00
FileSearchTool,
FunctionTool,
MessageStreamEvent,
RunStepStreamEvent,
RunStreamEvent,
ThreadStreamEvent,
)
```
Methods:
2024-04-17 12:35:22 -04:00
- <code title="post /assistants">client.beta.assistants.<a href="./src/openai/resources/beta/assistants.py">create</a>(\*\*<a href="src/openai/types/beta/assistant_create_params.py">params</a>) -> <a href="./src/openai/types/beta/assistant.py">Assistant</a></code>
- <code title="get /assistants/{assistant_id}">client.beta.assistants.<a href="./src/openai/resources/beta/assistants.py">retrieve</a>(assistant_id) -> <a href="./src/openai/types/beta/assistant.py">Assistant</a></code>
- <code title="post /assistants/{assistant_id}">client.beta.assistants.<a href="./src/openai/resources/beta/assistants.py">update</a>(assistant_id, \*\*<a href="src/openai/types/beta/assistant_update_params.py">params</a>) -> <a href="./src/openai/types/beta/assistant.py">Assistant</a></code>
- <code title="get /assistants">client.beta.assistants.<a href="./src/openai/resources/beta/assistants.py">list</a>(\*\*<a href="src/openai/types/beta/assistant_list_params.py">params</a>) -> <a href="./src/openai/types/beta/assistant.py">SyncCursorPage[Assistant]</a></code>
- <code title="delete /assistants/{assistant_id}">client.beta.assistants.<a href="./src/openai/resources/beta/assistants.py">delete</a>(assistant_id) -> <a href="./src/openai/types/beta/assistant_deleted.py">AssistantDeleted</a></code>
## Threads
Types:
```python
2024-04-15 15:05:04 -04:00
from openai.types.beta import (
AssistantResponseFormatOption,
AssistantToolChoice,
AssistantToolChoiceFunction,
AssistantToolChoiceOption,
Thread,
ThreadDeleted,
)
```
Methods:
- <code title="post /threads">client.beta.threads.<a href="./src/openai/resources/beta/threads/threads.py">create</a>(\*\*<a href="src/openai/types/beta/thread_create_params.py">params</a>) -> <a href="./src/openai/types/beta/thread.py">Thread</a></code>
- <code title="get /threads/{thread_id}">client.beta.threads.<a href="./src/openai/resources/beta/threads/threads.py">retrieve</a>(thread_id) -> <a href="./src/openai/types/beta/thread.py">Thread</a></code>
- <code title="post /threads/{thread_id}">client.beta.threads.<a href="./src/openai/resources/beta/threads/threads.py">update</a>(thread_id, \*\*<a href="src/openai/types/beta/thread_update_params.py">params</a>) -> <a href="./src/openai/types/beta/thread.py">Thread</a></code>
- <code title="delete /threads/{thread_id}">client.beta.threads.<a href="./src/openai/resources/beta/threads/threads.py">delete</a>(thread_id) -> <a href="./src/openai/types/beta/thread_deleted.py">ThreadDeleted</a></code>
- <code title="post /threads/runs">client.beta.threads.<a href="./src/openai/resources/beta/threads/threads.py">create_and_run</a>(\*\*<a href="src/openai/types/beta/thread_create_and_run_params.py">params</a>) -> <a href="./src/openai/types/beta/threads/run.py">Run</a></code>
### Runs
Types:
```python
from openai.types.beta.threads import RequiredActionFunctionToolCall, Run, RunStatus
```
Methods:
- <code title="post /threads/{thread_id}/runs">client.beta.threads.runs.<a href="./src/openai/resources/beta/threads/runs/runs.py">create</a>(thread_id, \*\*<a href="src/openai/types/beta/threads/run_create_params.py">params</a>) -> <a href="./src/openai/types/beta/threads/run.py">Run</a></code>
- <code title="get /threads/{thread_id}/runs/{run_id}">client.beta.threads.runs.<a href="./src/openai/resources/beta/threads/runs/runs.py">retrieve</a>(run_id, \*, thread_id) -> <a href="./src/openai/types/beta/threads/run.py">Run</a></code>
- <code title="post /threads/{thread_id}/runs/{run_id}">client.beta.threads.runs.<a href="./src/openai/resources/beta/threads/runs/runs.py">update</a>(run_id, \*, thread_id, \*\*<a href="src/openai/types/beta/threads/run_update_params.py">params</a>) -> <a href="./src/openai/types/beta/threads/run.py">Run</a></code>
- <code title="get /threads/{thread_id}/runs">client.beta.threads.runs.<a href="./src/openai/resources/beta/threads/runs/runs.py">list</a>(thread_id, \*\*<a href="src/openai/types/beta/threads/run_list_params.py">params</a>) -> <a href="./src/openai/types/beta/threads/run.py">SyncCursorPage[Run]</a></code>
- <code title="post /threads/{thread_id}/runs/{run_id}/cancel">client.beta.threads.runs.<a href="./src/openai/resources/beta/threads/runs/runs.py">cancel</a>(run_id, \*, thread_id) -> <a href="./src/openai/types/beta/threads/run.py">Run</a></code>
- <code title="post /threads/{thread_id}/runs/{run_id}/submit_tool_outputs">client.beta.threads.runs.<a href="./src/openai/resources/beta/threads/runs/runs.py">submit_tool_outputs</a>(run_id, \*, thread_id, \*\*<a href="src/openai/types/beta/threads/run_submit_tool_outputs_params.py">params</a>) -> <a href="./src/openai/types/beta/threads/run.py">Run</a></code>
#### Steps
Types:
```python
from openai.types.beta.threads.runs import (
CodeInterpreterLogs,
CodeInterpreterOutputImage,
CodeInterpreterToolCall,
CodeInterpreterToolCallDelta,
2024-04-17 12:35:22 -04:00
FileSearchToolCall,
FileSearchToolCallDelta,
FunctionToolCall,
FunctionToolCallDelta,
MessageCreationStepDetails,
RunStep,
RunStepDelta,
RunStepDeltaEvent,
RunStepDeltaMessageDelta,
RunStepInclude,
ToolCall,
ToolCallDelta,
ToolCallDeltaObject,
ToolCallsStepDetails,
)
```
Methods:
- <code title="get /threads/{thread_id}/runs/{run_id}/steps/{step_id}">client.beta.threads.runs.steps.<a href="./src/openai/resources/beta/threads/runs/steps.py">retrieve</a>(step_id, \*, thread_id, run_id, \*\*<a href="src/openai/types/beta/threads/runs/step_retrieve_params.py">params</a>) -> <a href="./src/openai/types/beta/threads/runs/run_step.py">RunStep</a></code>
- <code title="get /threads/{thread_id}/runs/{run_id}/steps">client.beta.threads.runs.steps.<a href="./src/openai/resources/beta/threads/runs/steps.py">list</a>(run_id, \*, thread_id, \*\*<a href="src/openai/types/beta/threads/runs/step_list_params.py">params</a>) -> <a href="./src/openai/types/beta/threads/runs/run_step.py">SyncCursorPage[RunStep]</a></code>
### Messages
Types:
```python
from openai.types.beta.threads import (
Annotation,
AnnotationDelta,
FileCitationAnnotation,
FileCitationDeltaAnnotation,
FilePathAnnotation,
FilePathDeltaAnnotation,
ImageFile,
ImageFileContentBlock,
ImageFileDelta,
ImageFileDeltaBlock,
ImageURL,
ImageURLContentBlock,
ImageURLDelta,
ImageURLDeltaBlock,
Message,
MessageContent,
MessageContentDelta,
MessageContentPartParam,
MessageDeleted,
MessageDelta,
MessageDeltaEvent,
RefusalContentBlock,
RefusalDeltaBlock,
Text,
TextContentBlock,
TextContentBlockParam,
TextDelta,
TextDeltaBlock,
)
```
Methods:
2024-04-17 12:35:22 -04:00
- <code title="post /threads/{thread_id}/messages">client.beta.threads.messages.<a href="./src/openai/resources/beta/threads/messages.py">create</a>(thread_id, \*\*<a href="src/openai/types/beta/threads/message_create_params.py">params</a>) -> <a href="./src/openai/types/beta/threads/message.py">Message</a></code>
- <code title="get /threads/{thread_id}/messages/{message_id}">client.beta.threads.messages.<a href="./src/openai/resources/beta/threads/messages.py">retrieve</a>(message_id, \*, thread_id) -> <a href="./src/openai/types/beta/threads/message.py">Message</a></code>
- <code title="post /threads/{thread_id}/messages/{message_id}">client.beta.threads.messages.<a href="./src/openai/resources/beta/threads/messages.py">update</a>(message_id, \*, thread_id, \*\*<a href="src/openai/types/beta/threads/message_update_params.py">params</a>) -> <a href="./src/openai/types/beta/threads/message.py">Message</a></code>
- <code title="get /threads/{thread_id}/messages">client.beta.threads.messages.<a href="./src/openai/resources/beta/threads/messages.py">list</a>(thread_id, \*\*<a href="src/openai/types/beta/threads/message_list_params.py">params</a>) -> <a href="./src/openai/types/beta/threads/message.py">SyncCursorPage[Message]</a></code>
2024-05-01 00:00:17 -04:00
- <code title="delete /threads/{thread_id}/messages/{message_id}">client.beta.threads.messages.<a href="./src/openai/resources/beta/threads/messages.py">delete</a>(message_id, \*, thread_id) -> <a href="./src/openai/types/beta/threads/message_deleted.py">MessageDeleted</a></code>
# Batches
Types:
```python
from openai.types import Batch, BatchError, BatchRequestCounts, BatchUsage
```
Methods:
- <code title="post /batches">client.batches.<a href="./src/openai/resources/batches.py">create</a>(\*\*<a href="src/openai/types/batch_create_params.py">params</a>) -> <a href="./src/openai/types/batch.py">Batch</a></code>
- <code title="get /batches/{batch_id}">client.batches.<a href="./src/openai/resources/batches.py">retrieve</a>(batch_id) -> <a href="./src/openai/types/batch.py">Batch</a></code>
2024-04-18 10:49:14 -04:00
- <code title="get /batches">client.batches.<a href="./src/openai/resources/batches.py">list</a>(\*\*<a href="src/openai/types/batch_list_params.py">params</a>) -> <a href="./src/openai/types/batch.py">SyncCursorPage[Batch]</a></code>
- <code title="post /batches/{batch_id}/cancel">client.batches.<a href="./src/openai/resources/batches.py">cancel</a>(batch_id) -> <a href="./src/openai/types/batch.py">Batch</a></code>
# Uploads
Types:
```python
from openai.types import Upload
```
Methods:
- <code title="post /uploads">client.uploads.<a href="./src/openai/resources/uploads/uploads.py">create</a>(\*\*<a href="src/openai/types/upload_create_params.py">params</a>) -> <a href="./src/openai/types/upload.py">Upload</a></code>
- <code title="post /uploads/{upload_id}/cancel">client.uploads.<a href="./src/openai/resources/uploads/uploads.py">cancel</a>(upload_id) -> <a href="./src/openai/types/upload.py">Upload</a></code>
- <code title="post /uploads/{upload_id}/complete">client.uploads.<a href="./src/openai/resources/uploads/uploads.py">complete</a>(upload_id, \*\*<a href="src/openai/types/upload_complete_params.py">params</a>) -> <a href="./src/openai/types/upload.py">Upload</a></code>
## Parts
Types:
```python
from openai.types.uploads import UploadPart
```
Methods:
- <code title="post /uploads/{upload_id}/parts">client.uploads.parts.<a href="./src/openai/resources/uploads/parts.py">create</a>(upload_id, \*\*<a href="src/openai/types/uploads/part_create_params.py">params</a>) -> <a href="./src/openai/types/uploads/upload_part.py">UploadPart</a></code>
# [Responses](src/openai/resources/responses/api.md)
# [Realtime](src/openai/resources/realtime/api.md)
# [Conversations](src/openai/resources/conversations/api.md)
# Evals
Types:
```python
from openai.types import (
EvalCustomDataSourceConfig,
EvalStoredCompletionsDataSourceConfig,
EvalCreateResponse,
EvalRetrieveResponse,
EvalUpdateResponse,
EvalListResponse,
EvalDeleteResponse,
)
```
Methods:
- <code title="post /evals">client.evals.<a href="./src/openai/resources/evals/evals.py">create</a>(\*\*<a href="src/openai/types/eval_create_params.py">params</a>) -> <a href="./src/openai/types/eval_create_response.py">EvalCreateResponse</a></code>
- <code title="get /evals/{eval_id}">client.evals.<a href="./src/openai/resources/evals/evals.py">retrieve</a>(eval_id) -> <a href="./src/openai/types/eval_retrieve_response.py">EvalRetrieveResponse</a></code>
- <code title="post /evals/{eval_id}">client.evals.<a href="./src/openai/resources/evals/evals.py">update</a>(eval_id, \*\*<a href="src/openai/types/eval_update_params.py">params</a>) -> <a href="./src/openai/types/eval_update_response.py">EvalUpdateResponse</a></code>
- <code title="get /evals">client.evals.<a href="./src/openai/resources/evals/evals.py">list</a>(\*\*<a href="src/openai/types/eval_list_params.py">params</a>) -> <a href="./src/openai/types/eval_list_response.py">SyncCursorPage[EvalListResponse]</a></code>
- <code title="delete /evals/{eval_id}">client.evals.<a href="./src/openai/resources/evals/evals.py">delete</a>(eval_id) -> <a href="./src/openai/types/eval_delete_response.py">EvalDeleteResponse</a></code>
## Runs
Types:
```python
from openai.types.evals import (
CreateEvalCompletionsRunDataSource,
CreateEvalJSONLRunDataSource,
EvalAPIError,
RunCreateResponse,
RunRetrieveResponse,
RunListResponse,
RunDeleteResponse,
RunCancelResponse,
)
```
Methods:
- <code title="post /evals/{eval_id}/runs">client.evals.runs.<a href="./src/openai/resources/evals/runs/runs.py">create</a>(eval_id, \*\*<a href="src/openai/types/evals/run_create_params.py">params</a>) -> <a href="./src/openai/types/evals/run_create_response.py">RunCreateResponse</a></code>
- <code title="get /evals/{eval_id}/runs/{run_id}">client.evals.runs.<a href="./src/openai/resources/evals/runs/runs.py">retrieve</a>(run_id, \*, eval_id) -> <a href="./src/openai/types/evals/run_retrieve_response.py">RunRetrieveResponse</a></code>
- <code title="get /evals/{eval_id}/runs">client.evals.runs.<a href="./src/openai/resources/evals/runs/runs.py">list</a>(eval_id, \*\*<a href="src/openai/types/evals/run_list_params.py">params</a>) -> <a href="./src/openai/types/evals/run_list_response.py">SyncCursorPage[RunListResponse]</a></code>
- <code title="delete /evals/{eval_id}/runs/{run_id}">client.evals.runs.<a href="./src/openai/resources/evals/runs/runs.py">delete</a>(run_id, \*, eval_id) -> <a href="./src/openai/types/evals/run_delete_response.py">RunDeleteResponse</a></code>
- <code title="post /evals/{eval_id}/runs/{run_id}">client.evals.runs.<a href="./src/openai/resources/evals/runs/runs.py">cancel</a>(run_id, \*, eval_id) -> <a href="./src/openai/types/evals/run_cancel_response.py">RunCancelResponse</a></code>
### OutputItems
Types:
```python
from openai.types.evals.runs import OutputItemRetrieveResponse, OutputItemListResponse
```
Methods:
- <code title="get /evals/{eval_id}/runs/{run_id}/output_items/{output_item_id}">client.evals.runs.output_items.<a href="./src/openai/resources/evals/runs/output_items.py">retrieve</a>(output_item_id, \*, eval_id, run_id) -> <a href="./src/openai/types/evals/runs/output_item_retrieve_response.py">OutputItemRetrieveResponse</a></code>
- <code title="get /evals/{eval_id}/runs/{run_id}/output_items">client.evals.runs.output_items.<a href="./src/openai/resources/evals/runs/output_items.py">list</a>(run_id, \*, eval_id, \*\*<a href="src/openai/types/evals/runs/output_item_list_params.py">params</a>) -> <a href="./src/openai/types/evals/runs/output_item_list_response.py">SyncCursorPage[OutputItemListResponse]</a></code>
2025-05-21 18:37:19 +00:00
# Containers
Types:
```python
from openai.types import ContainerCreateResponse, ContainerRetrieveResponse, ContainerListResponse
```
Methods:
- <code title="post /containers">client.containers.<a href="./src/openai/resources/containers/containers.py">create</a>(\*\*<a href="src/openai/types/container_create_params.py">params</a>) -> <a href="./src/openai/types/container_create_response.py">ContainerCreateResponse</a></code>
- <code title="get /containers/{container_id}">client.containers.<a href="./src/openai/resources/containers/containers.py">retrieve</a>(container_id) -> <a href="./src/openai/types/container_retrieve_response.py">ContainerRetrieveResponse</a></code>
- <code title="get /containers">client.containers.<a href="./src/openai/resources/containers/containers.py">list</a>(\*\*<a href="src/openai/types/container_list_params.py">params</a>) -> <a href="./src/openai/types/container_list_response.py">SyncCursorPage[ContainerListResponse]</a></code>
- <code title="delete /containers/{container_id}">client.containers.<a href="./src/openai/resources/containers/containers.py">delete</a>(container_id) -> None</code>
## Files
Types:
```python
from openai.types.containers import FileCreateResponse, FileRetrieveResponse, FileListResponse
```
Methods:
- <code title="post /containers/{container_id}/files">client.containers.files.<a href="./src/openai/resources/containers/files/files.py">create</a>(container_id, \*\*<a href="src/openai/types/containers/file_create_params.py">params</a>) -> <a href="./src/openai/types/containers/file_create_response.py">FileCreateResponse</a></code>
- <code title="get /containers/{container_id}/files/{file_id}">client.containers.files.<a href="./src/openai/resources/containers/files/files.py">retrieve</a>(file_id, \*, container_id) -> <a href="./src/openai/types/containers/file_retrieve_response.py">FileRetrieveResponse</a></code>
- <code title="get /containers/{container_id}/files">client.containers.files.<a href="./src/openai/resources/containers/files/files.py">list</a>(container_id, \*\*<a href="src/openai/types/containers/file_list_params.py">params</a>) -> <a href="./src/openai/types/containers/file_list_response.py">SyncCursorPage[FileListResponse]</a></code>
- <code title="delete /containers/{container_id}/files/{file_id}">client.containers.files.<a href="./src/openai/resources/containers/files/files.py">delete</a>(file_id, \*, container_id) -> None</code>
### Content
Methods:
- <code title="get /containers/{container_id}/files/{file_id}/content">client.containers.files.content.<a href="./src/openai/resources/containers/files/content.py">retrieve</a>(file_id, \*, container_id) -> HttpxBinaryResponseContent</code>
2026-02-10 18:05:29 +00:00
# Skills
Types:
```python
from openai.types import DeletedSkill, Skill, SkillList
```
Methods:
- <code title="post /skills">client.skills.<a href="./src/openai/resources/skills/skills.py">create</a>(\*\*<a href="src/openai/types/skill_create_params.py">params</a>) -> <a href="./src/openai/types/skill.py">Skill</a></code>
- <code title="get /skills/{skill_id}">client.skills.<a href="./src/openai/resources/skills/skills.py">retrieve</a>(skill_id) -> <a href="./src/openai/types/skill.py">Skill</a></code>
- <code title="post /skills/{skill_id}">client.skills.<a href="./src/openai/resources/skills/skills.py">update</a>(skill_id, \*\*<a href="src/openai/types/skill_update_params.py">params</a>) -> <a href="./src/openai/types/skill.py">Skill</a></code>
- <code title="get /skills">client.skills.<a href="./src/openai/resources/skills/skills.py">list</a>(\*\*<a href="src/openai/types/skill_list_params.py">params</a>) -> <a href="./src/openai/types/skill.py">SyncCursorPage[Skill]</a></code>
- <code title="delete /skills/{skill_id}">client.skills.<a href="./src/openai/resources/skills/skills.py">delete</a>(skill_id) -> <a href="./src/openai/types/deleted_skill.py">DeletedSkill</a></code>
## Content
Methods:
- <code title="get /skills/{skill_id}/content">client.skills.content.<a href="./src/openai/resources/skills/content.py">retrieve</a>(skill_id) -> HttpxBinaryResponseContent</code>
## Versions
Types:
```python
from openai.types.skills import DeletedSkillVersion, SkillVersion, SkillVersionList
```
Methods:
- <code title="post /skills/{skill_id}/versions">client.skills.versions.<a href="./src/openai/resources/skills/versions/versions.py">create</a>(skill_id, \*\*<a href="src/openai/types/skills/version_create_params.py">params</a>) -> <a href="./src/openai/types/skills/skill_version.py">SkillVersion</a></code>
- <code title="get /skills/{skill_id}/versions/{version}">client.skills.versions.<a href="./src/openai/resources/skills/versions/versions.py">retrieve</a>(version, \*, skill_id) -> <a href="./src/openai/types/skills/skill_version.py">SkillVersion</a></code>
- <code title="get /skills/{skill_id}/versions">client.skills.versions.<a href="./src/openai/resources/skills/versions/versions.py">list</a>(skill_id, \*\*<a href="src/openai/types/skills/version_list_params.py">params</a>) -> <a href="./src/openai/types/skills/skill_version.py">SyncCursorPage[SkillVersion]</a></code>
- <code title="delete /skills/{skill_id}/versions/{version}">client.skills.versions.<a href="./src/openai/resources/skills/versions/versions.py">delete</a>(version, \*, skill_id) -> <a href="./src/openai/types/skills/deleted_skill_version.py">DeletedSkillVersion</a></code>
### Content
Methods:
- <code title="get /skills/{skill_id}/versions/{version}/content">client.skills.versions.content.<a href="./src/openai/resources/skills/versions/content.py">retrieve</a>(version, \*, skill_id) -> HttpxBinaryResponseContent</code>
# Videos
Types:
```python
from openai.types import (
ImageInputReferenceParam,
Video,
VideoCreateError,
VideoModel,
VideoSeconds,
VideoSize,
VideoDeleteResponse,
VideoCreateCharacterResponse,
VideoGetCharacterResponse,
)
```
Methods:
- <code title="post /videos">client.videos.<a href="./src/openai/resources/videos.py">create</a>(\*\*<a href="src/openai/types/video_create_params.py">params</a>) -> <a href="./src/openai/types/video.py">Video</a></code>
- <code title="get /videos/{video_id}">client.videos.<a href="./src/openai/resources/videos.py">retrieve</a>(video_id) -> <a href="./src/openai/types/video.py">Video</a></code>
- <code title="get /videos">client.videos.<a href="./src/openai/resources/videos.py">list</a>(\*\*<a href="src/openai/types/video_list_params.py">params</a>) -> <a href="./src/openai/types/video.py">SyncConversationCursorPage[Video]</a></code>
- <code title="delete /videos/{video_id}">client.videos.<a href="./src/openai/resources/videos.py">delete</a>(video_id) -> <a href="./src/openai/types/video_delete_response.py">VideoDeleteResponse</a></code>
- <code title="post /videos/characters">client.videos.<a href="./src/openai/resources/videos.py">create_character</a>(\*\*<a href="src/openai/types/video_create_character_params.py">params</a>) -> <a href="./src/openai/types/video_create_character_response.py">VideoCreateCharacterResponse</a></code>
- <code title="get /videos/{video_id}/content">client.videos.<a href="./src/openai/resources/videos.py">download_content</a>(video_id, \*\*<a href="src/openai/types/video_download_content_params.py">params</a>) -> HttpxBinaryResponseContent</code>
- <code title="post /videos/edits">client.videos.<a href="./src/openai/resources/videos.py">edit</a>(\*\*<a href="src/openai/types/video_edit_params.py">params</a>) -> <a href="./src/openai/types/video.py">Video</a></code>
- <code title="post /videos/extensions">client.videos.<a href="./src/openai/resources/videos.py">extend</a>(\*\*<a href="src/openai/types/video_extend_params.py">params</a>) -> <a href="./src/openai/types/video.py">Video</a></code>
- <code title="get /videos/characters/{character_id}">client.videos.<a href="./src/openai/resources/videos.py">get_character</a>(character_id) -> <a href="./src/openai/types/video_get_character_response.py">VideoGetCharacterResponse</a></code>
- <code title="post /videos/{video_id}/remix">client.videos.<a href="./src/openai/resources/videos.py">remix</a>(video_id, \*\*<a href="src/openai/types/video_remix_params.py">params</a>) -> <a href="./src/openai/types/video.py">Video</a></code>