use kagi_api::v0::{universal_summarizer::SummaryOptions, UniversalSummarizer}; #[tokio::main] async fn main() { let config = kagi_api::KagiConfig::with_api_key("api key goes here"); let client = kagi_api::KagiClient::new(config); let options = SummaryOptions::default(); let some_url = url::Url::parse("https://en.wikipedia.org/wiki/A_Cyborg_Manifesto").unwrap(); let summary = client .summarize_url(some_url, options) .await .expect("A valid Universal Summarizer result"); // FIXME: Cannot `.render()` without kagi-cli: Remove `Render` trait's coupling from `Args`. serde_json::to_writer_pretty(std::io::stdout(), &summary).unwrap(); }