{"id":58230,"library":"async-openai","title":"Async OpenAI","description":"Rust library for OpenAI API, providing async access to models, completions, and more.","status":"active","version":"0.39.0","language":"rust","source_language":null,"source_url":"https://github.com/64bit/async-openai","tags":["openai","api","async","ai","machine-learning"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nasync-openai = \"0.39.0\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add async-openai","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"Client","correct":"use async_openai::Client;"}],"quickstart":{"code":"use async_openai::Client;\nuse async_openai::types::CreateCompletionRequest;\n\n#[tokio::main]\nasync fn main() {\n    let client = Client::new();\n    let request = CreateCompletionRequest {\n        model: \"text-davinci-003\".to_string(),\n        prompt: Some(\"Say hello\".to_string()),\n        max_tokens: Some(5),\n        ..Default::default()\n    };\n    let response = client.completions().create(request).await.unwrap();\n    println!(\"Response: {:?}\", response);\n}","lang":"rust","description":"Creates an OpenAI client and sends a completion request."},"warnings":[{"fix":"Add tokio as a dependency and use #[tokio::main].","message":"Requires an async runtime like Tokio.","severity":"gotcha","affected_versions":">=0.39.0"},{"fix":"Set OPENAI_API_KEY before running.","message":"API key must be set via environment variable OPENAI_API_KEY.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'access':10 'ai':19 'api':7,17 'async':1,9,18 'complet':13 'learn':22 'librari':4 'machin':21 'machine-learn':20 'model':12 'openai':2,6,16 'provid':8 'rust':3","created_at":"2026-06-16T16:15:58.720836+00:00","updated_at":"2026-06-16T16:15:58.720836+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/64bit/async-openai","github":"https://github.com/64bit/async-openai","docs":"https://docs.rs/async-openai/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["http-client","async"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-16","next_check":"2026-12-13","install_tag":null}}