Claude Code API Rs banner
ZhangHanDong ZhangHanDong

Claude Code API Rs

Development community intermediate

Description

[](https://github.com/ZhangHanDong/claude-code-api-rs) [](LICENSE) [](https://www.rust-lang.org)

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Claude Code API

[](https://github.com/ZhangHanDong/claude-code-api-rs) [](LICENSE) [](https://www.rust-lang.org)

[中文文档](README_CN.md) | [日本語](README_JA.md) | English


🦀 cc-sdk v0.6.0 - Rust SDK for Claude Code

**🎉 100% Feature Parity with Python claude-agent-sdk v0.1.14!** | **🌐 WebSocket Transport (v0.6.0)**

[](https://crates.io/crates/cc-sdk) [](https://docs.rs/cc-sdk)

**[cc-sdk](./claude-code-sdk-rs)** is the official Rust SDK for Claude Code CLI, providing:

  • 📥 Auto CLI Download - Automatically downloads Claude Code CLI if not found
  • 📁 File Checkpointing - Rewind file changes to any conversation point
  • 📊 Structured Output - JSON schema validation for responses
  • 🔧 Full Control Protocol - Permissions, hooks, MCP servers
  • 💰 Budget Control - max_budget_usd and fallback_model support
  • 🏖️ Sandbox - Bash isolation for filesystem/network
use 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(())
}

👉 **[Full SDK Documentation](./claude-code-sdk-rs/README.md)** | **[API Docs](https://docs.rs/cc-sdk)**


A high-performance Rust implementation of an OpenAI-compatible API gateway for Claude Code CLI. Built on top of the robust [cc-sdk](https://github.com/ZhangHanDong/claude-code-api-rs/tree/main/claude-code-sdk-rs), this project provides a RESTful API interface that allows you to interact with Claude Code using the familiar OpenAI API format.

🎉 Who's Using Claude Code API

...