Start from the repository root.
cargo test --test readme_contract
cargo check --examples --all-features
cargo test --docThese commands compile and run without credentials:
cargo run --example responses_quickstart
cargo run --example responses_streaming
cargo run --example structured_outputs
cargo run --example request_metadata
cargo run --example embeddings
cargo run --example upload_to_vector_store
cargo run --example chat_completions_migrationExport OPENAI_API_KEY, then use the Responses family:
use openai_rust::OpenAI;
use openai_rust::resources::responses::{ResponseCreateParams, ResponseInput};
let client = OpenAI::builder().build();
let params = ResponseCreateParams {
model: "gpt-5.5".into(),
input: Some(ResponseInput::text("Say hello from Rust.")),
..Default::default()
};
// client.responses().create(params)?;
let _ = params;For a zero-cost config check, call client.prepare_request("GET", "/models")? before issuing a live request.