NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io, #3505 most downloaded on crates.io
Rust library for OpenAI
Latest stable
0.43.0
Last release 19 days ago
01 Nov 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
4 years old
127 releases · first in 2022
Drag across the ruler to compare, or tap a release to open it.
[Example]: Use serde, schemars to make structure output code easy by @cptrodgers in https://github.com/64bit/async-openai/pull/301
Full Changelog: https://github.com/64bit/async-openai/compare/async-openai-v0.27.0...async-openai-v0.27.1
Fix chunking strategy serialization and field visibility by @nikessel in https://github.com/64bit/async-openai/pull/288
Full Changelog: https://github.com/64bit/async-openai/compare/async-openai-v0.26.0...async-openai-v0.27.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
updated moderation types from spec (breaking change) #286
Added types for Realtime API, can be enabled by feature flag realtime #276
realtime #276examples/realtime #276Fix: Fix service_tier serialization for CreateChatCompletionRequest #263 by @tomgie Fix: Fix content, refusal serialization for CreateChatCompletionRe
Fix: Fix service_tier serialization for CreateChatCompletionRequest #263 by @tomgie
Fix: Fix content, refusal serialization for CreateChatCompletionRequest #267 by @chirino
Fix: Fix deserialization of ListVectorStoresResponse #242 #270
Sync upstream spec with breaking changes (hence minor version bump) #257
VectorStoreFileErorCode enum variants in #249 by @JensWalterCreateAssistantToolFileSearchResources with optional fields in #252 by @vrurgMake error message for ApiError more user-friendly by @GabrielBianconi in #238 #240
ApiError more user-friendly by @GabrielBianconi in #238 #240Deserialize anywhere Serialize is derived by @kczimm in #241Skip serialization of None optional fields in CreateRunRequest because API does not accept "null" #234 #235 #236
None optional fields in CreateRunRequest because API does not accept "null" #234 #235 #236Change max_tokens from u16 to u32 for larger context window in recent models #232 #233 by @MakotoE
max_tokens from u16 to u32 for larger context window in recent models #232 #233 by @MakotoEAudio translate API in SRT format via Audio::translate_raw
Audio::translate_rawVectorStoreFileObjectChunkingStrategy and VectorStoreObject by @hiibolt in #230Assistants streaming API support
Bytes instead of StringFileCitation deserialization fix #222 by @kitaliaList checkpoints Fine Tuning API
Added
Updated
ApiError to match spec.updated [breaking change]: Latest Audio APIs - with support for all response formats by @emk in #202
examples/vision-chat by @Gabriel2409 in #203added: New Client::build to initialize client without overhead (full context here) by @GabrielBianconi #197
Client::build to initialize client without overhead (full context here) by @GabrielBianconi #197examples/assistant by @sgopalan98 #200deleted: Edits and FineTunes which were deprecated and are now fully removed from spec and official documentation. Corresponding examples are also del…
usage field to RunObject in #195 by @turingbuilderEdits and FineTunes which were deprecated and are now fully removed from spec and official documentation. Corresponding examples are also deleted. Hence the minor version bumpfixed: Add missing language field in create transcription request #188 by @Taoaozw
language field in create transcription request #188 by @TaoaozwAdded dimensions param to embedding request #184 #185 by @vmg-dev
fixed: Optional model in ModifyAssistantRequest in #174 by @CakeCrusher
ModifyAssistantRequest in #174 by @CakeCrusherexperiments branch) #178 by @ifsheldonadded: feature flag rustls-webpki-roots = ["reqwest/rustls-tls-webpki-roots"] by @xutianyi1999 #168
rustls-webpki-roots = ["reqwest/rustls-tls-webpki-roots"] by @xutianyi1999 #168query parameter #172fixed: Fix: Make ChatCompletionToolChoiceOption enum variants lowercase #158 by @dmweis
This release introduces breaking change for file input (from filesystem or in-memory) but is backward compatible, hence bumping the minor version.
This release introduces breaking change for file input (from filesystem or in-memory) but is backward compatible, hence bumping the minor version.
@ifsheldon's great effort has added WASM support, it lives in experiments branch. To use it please pin directly to git sha in your Cargo.toml. Any discussion, issues, related to WASM are welcome in https://github.com/64bit/async-openai/issues/102 . Any WASM related PRs are welcome in experiments branch.
While OpenAI was going through unprecedented times, these people were shipping! so in OpenAI style:
❤️ 💙 💛 💚 ❤️ 💙 💛
@ifsheldon
@Strange-Knoll
@frankfralick
@Prosammer
❤️ 💙 💛 💚 ❤️ 💙 💛
bug fix: Rename tools_outputs to tool_outputs #147
bug fix: expires_at needs to be Optional in RunObject #141
expires_at needs to be Optional in RunObject #141system_fingerprint field to CreateChatCompletionStreamResponse; updates to few doc comments #142bug fix: Add missing pub modifiers from couple of struct fields #139 #137
pub modifiers from couple of struct fields #139 #137added: Text to speech API #130 by @m1guelpf
examples/* are tested.Many thanks to contributor @m1guelpf
Mark Edit and FineTunes to be deprecated
secrecy crate to store api_key : Secret<String> in configs #114 by @ironman5366Copy for enums: ImageSize, ResponseFormat, TextModerationModel, Role, and AudioResponseFormat #117 by @m1guelpfClient #123 by @Czechhfinish_reason to match latest spec for chat completions API #111 by @retrageChatCompletionFunctionCall enum for better DX #118 by @m1guelpfChat & Completion:
FinishReason & CompletionFinishReason for finish_reason instead of StringUsage to CompletionUsageEmbeddings:
encoding_format in CreateEmbeddingRequestFiles:
status_detail field type in OpenAIFile from object to StringImages:
ImageData to Image to match specImageResponse to ImagesResponse to match specModerations:
Fine Tuning
Fine Tunes & Edit
Edit and FineTunes to be deprecatedDoc comments
Thank you to the contributors (@m1guelpf , @Czechh ) and first time (@ironman5366 , @retrage ) contributors! 🎉
updated: Custom Debug implementation for AzureConfig and OpenAIConfig to prevent printing of API key #112
Debug implementation for AzureConfig and OpenAIConfig to prevent printing of API key #112added: derive Deserialize for OpenAIConfig and AzureConfig to read configurations from files #107 #108
Deserialize for OpenAIConfig and AzureConfig to read configurations from files #107 #108fixed: Propogate error up on failure to create reqwest::Request
reqwest::Request"content": null as required by chat completion API: #103This release makes all multipart form submissions (file uploads) retry on rate limit. #100 There are no breaking changes. The minor version was bumped…
This release makes all multipart form submissions (file uploads) retry on rate limit. #100 There are no breaking changes. The minor version was bumped because of internal refactor to support file upload retries.
fixed : Bug fix to handle function call streaming #98
examples/function-call-stream is now fully streamable #98updated: Chat streaming response types now reflect the OpenAPI spec #92
ChatCompletionResponseStreamMessage is now ChatCompletionStreamResponseDeltaChatChoiceDelta is now ChatCompletionResponseStreamMessager#type field of ApiError is changed from String to Option<String> to support Azure OpenAI service error spec #95examples/fine-tune-cli by @Doordashcon #84examples/function-call-stream by @oslfmt #90bug fix: OpenAIConfig would generate url with constant OPENAI_API_BASE even after api_base has been changed. This bug has been fixed in #88
OpenAIConfig would generate url with constant OPENAI_API_BASE even after api_base has been changed. This bug has been fixed in #88added: crate feature native-tls-vendored = ["reqwest/native-tls-vendored"] #82 Context for this feature:
added: crate feature native-tls-vendored = ["reqwest/native-tls-vendored"] #82
Context for this feature:
I run my rust services on ARM-based AWS graviton instances which have a different version of OpenSSL that doesn't play nicely with reqwest. This diff adds a new feature to async-openai that allows removing the dependency on OpenSSL by opting in for the native-tls-vendored feature in the reqwest library.
I've tested this on graviton with an incompatible version of OpenSSL and things work nicely :)
added: function call support along with an example. This is a breaking change only for chat completion types. #79 #81
added: To fulfill Clone & Debug derives on Client: Derive Debug and Clone on AzureConfig and OpenAIConfig; Config trait requires Clone
Debug and Clone on AzureConfig and OpenAIConfig; Config trait requires CloneThere are two configurations OpenAIConfig and AzureConfig to be used in Client::with_config( config )
OpenAIConfig and AzureConfig to be used in Client::with_config( config )Client::new() defaults to client with default OpenAIConfig with type change to Client<OpenAIConfig>Client instead platform specific configurations are done through OpenAIConfig or AzureConfigazure-openai-serviceadded: all request and response types in types.rs derive Serialize trait #66
types.rs derive Serialize trait #66@djrodgerspryor made their first contribution #65 #66 🎉
added: Derive PartialEq for all types.
PartialEq for all types.tracing::error for all deserialization errorLog or retain useful information when error occurs for visibility and debuggability :
Log or retain useful information when error occurs for visibility and debuggability :
tracing::error!( ... ) with actual payload returned from API when de-serialization fails: to help debugging the APIs which are in beta and their types are "fluid"added: rustls support. By default async-openai now use rustls for reqwest; native tls ( which was default behavior of reqwest ) is available through f
rustls support. By default async-openai now use rustls for reqwest; native tls ( which was default behavior of reqwest ) is available through feature flag native-tls #60added: Configure custom reqwest client through with_http_client method on async_openai::Client #58
reqwest client through with_http_client method on async_openai::Client #58added: Derive Clone for all API types #55
Clone for all API types #55added: derive Deserialize for CreateChatCompletionRequest and its related types ChatCompletionRequestMessage, Role; and Prompt #53
Deserialize for CreateChatCompletionRequest and its related types ChatCompletionRequestMessage, Role; and Prompt #53Skip serialization of user if None in CreateChatCompletionRequest #52
user if None in CreateChatCompletionRequest #52Sync openapi spec https://github.com/openai/openai-openapi/commit/8b9c21f34dd76e5d1f2435c6e80b45ca0a6d2be9 #51
user, max_tokens to CreateChatCompletionRequest #49 #51language to CreateTranscriptionRequest #51finish_reason in ChatChoice is now Option #46
finish_reason in ChatChoice is now Option<String> #46Remove unused fields in CreateEditResponse #41
CreateEditResponse #41CreateImageEditRequest now takes mask as an optional parametercrate dependencies are upgraded, only base64 crate had breaking changes
base64 crate had breaking changesbeta.openai.com to platform.openai.comcorrect implementation of Default trait for Client
Default trait for ClientReturn full paths to the image files from save method in ImageResponse. Previously save method returned ()
ImageResponse. Previously save method returned ()Starting with 0.5.0 I'm hoping to not have major breaking changes, as the functionality and ergonomics are better than any previous versions.
Starting with 0.5.0 I'm hoping to not have major breaking changes, as the functionality and ergonomics are better than any previous versions.
Previously on 0.4.0 and older versions
// step 1: Create client
let client = Client::new();
// step 2: Create request
let request = CreateCompletionRequest {
model: "text-ada-001".to_owned(),
prompt: Some(Prompt::String(
"Tell me a joke about the universe".to_owned(),
)),
max_tokens: Some(40),
..Default::default()
};
// step 3: Send request
let response = Completions::create(&client, request).await?;
New improved way in 0.5.0
// Use builder pattern
let client = Client::new();
// Request struct has companion builder struct with same name + Args suffix
let request = CreateCompletionRequestArgs::default()
.model("text-davinci-003")
.prompt("Tell me a joke about the universe")
.max_tokens(40_u16)
.build()?;
let response = client
.completions() // chain the API "group" (completions, images,
// embeddings, models, fine_tunes, models, edits)
.create(request).await?; // call the API on selected "group"
v0.4.0 is the first release to support all APIs under https://api.openai.com/v1 .
v0.4.0 is the first release to support all APIs under https://api.openai.com/v1 .Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.