by ZhangHanDong
A high-performance Rust implementation of an OpenAI-compatible API gateway for Claude Code CLI.
# Add to your Claude Code skills
git clone https://github.com/ZhangHanDong/claude-code-api-rs🎉 100% Feature Parity with Python claude-agent-sdk v0.1.14!
cc-sdk is the official Rust SDK for Claude Code CLI, providing:
max_budget_usd and fallback_model supportuse cc_sdk::{query, ClaudeCodeOptions};
use futures::StreamExt;
#[tokio::main]
async fn main() -> cc_sdk::Result<()> {
let options = ClaudeCodeOptions::builder()
.model("claude-opus-4-5-20251101") // Latest Opus 4.5
.auto_download_cli(true) // Auto-download CLI
.max_budget_usd(10.0) // Budget limit
.build();
let mut stream = query("Hello, Claude!", Some(options)).await?;
while let Some(msg) = stream.next().await {
println!("{:?}", msg?);
}
Ok(())
}
No comments yet. Be the first to share your thoughts!
A high-performance Rust implementation of an OpenAI-compatible API gateway for Claude Code CLI. Built on top of the robust cc-sdk, this project provides a RESTful API interface that allows you to interact with Claude Code using the familiar OpenAI API format.