Responses is the primary generation surface in this crate.
use openai_rust::resources::responses::{ResponseCreateParams, ResponseInput};
let params = ResponseCreateParams {
model: "gpt-5.5".into(),
input: Some(ResponseInput::text("Summarize the Rust ownership rules.")),
..Default::default()
};
let _ = params;Run the executable walkthrough:
cargo run --example responses_streamingThe example uses ResponseStream::from_sse_chunks(...) so the streaming API can be exercised without network setup.
Run the structured-output example:
cargo run --example structured_outputsThe example builds ResponseParseParams, ResponseTextConfig, ResponseFormatTextConfig, ResponseTool, and FunctionTool with the public exports shipped by src/resources/responses.rs.
Run the metadata walkthrough:
cargo run --example request_metadataThat example demonstrates the stable ApiResponse<T> and ResponseMetadata accessors used to inspect request IDs and headers after a typed response returns.