{"repo":"dongri/openai-api-rs","free":true,"listed":false,"github":"https://github.com/dongri/openai-api-rs","clone":"git clone https://github.com/dongri/openai-api-rs.git","description":"OpenAI API client library for Rust (unofficial)","language":"Rust","stars":486,"topics":["openai","rust","gpt-4","gpt-3-5-turbo","api","gpt-4o","gpt-4o-mini","o1","realtime","openrouter"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"OpenAI API client library for Rust (unofficial) The OpenAI API client Rust library provides convenient access to the OpenAI API from Rust applications. Check out the docs.rs. Installation: Cargo.toml Usage The library needs to be configured with your account's secret key, which is available on the website. We recommend setting it as an environment variable. Here's an example of initializing the library with the API key loaded from an environment variable and creating a completion: Set OPENAI API KEY or OPENROUTER API KEY to environment variable Create OpenAI client Create OpenRouter client Create request Send request Set OPENAI API BASE to environment variable (optional) Example of chat completion Example for OpenRouter More Examples: examples Check out the full API documentation for examples of all the available functions. Supported APIs - [x] Completions - [x] Chat - [x] Edits - [x] Images - [x] Embeddings - [x] Audio - [x] Files - [x] Fine-tuning - [x] Moderations - [x] Function calling - [x] Assistants - [x] Batch - [x] Realtime - [x] Responses License This project is licensed under MIT license.","default_branch":null,"files":null,"tree":[],"storefront":"/r/dongri","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dongri/openai-api-rs/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}