> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://uploadcare.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://uploadcare.com/docs/_mcp/server.

# Rust API Client

> Rust Uploadcare API client for Fast & Reliable File Uploads; File, Group, Project Operations; Video + Document Conversion & More.

Rust integration handles uploads and file operations by wrapping Uploadcare
[Upload API](https://uploadcare.com/docs/api/upload/) and [REST API](https://uploadcare.com/docs/api/rest/). This
comprehensive API client lets you use most of the Uploadcare features from within
your Rust app.

[GitHub →](https://github.com/uploadcare/uploadcare-rust)

## Features

Uploading ([Upload API](https://uploadcare.com/docs/api/upload/)):

* Upload files from local storage and URLs (up to 5 TB)
* Multipart uploading for large files
* Uploading network to speed uploading jobs (like CDN)

File management ([REST API](https://uploadcare.com/docs/api/rest/)):

* Get file info and perform various operations (store/delete/copy) with them
* Work with groups of files
* Get info about account project
* Manage webhooks
* Convert documents
* Encode and transform videos

Image processing ([URL API](https://uploadcare.com/docs/api/url/)):

* Compression
* Geometry
* Colors
* Definition
* Image and text overlays
* Rotations
* Recognition
* File info
* Proxy (fetch)

Security features:

* Secure authentication
* Secure uploads (signed uploads)
* Secure delivery (signed URLs)

## Requirements

* rustc 1.43
* cargo 1.43

## Installation

Ensure you have Cargo, the Rust dependency manager, installed on your system.
If not, follow the [installation instructions](https://doc.rust-lang.org/cargo/getting-started/installation.html).

Open your `cargo.toml` file and add the following code:

```toml
[dependencies]
uploadcare = "^0.2"
```

## Configuration

By default the `full` is enabled (REST and Upload API).

To reduce the code size, disable default features and enable just the APIs you use:

```toml
# Example: REST API only
uploadcare = { version = "*", default-features = false, features = ["rest"] }
```

Creating a client:

```rust
use ucare;
use ucare::file;
use ucare::upload;

// creating rest client
let rest_config = ucare::RestConfig {
    sign_based_auth: true,
    api_version: ucare::RestApiVersion::V06,
};
let rest_client = ucare::RestClient::new(rest_config, ucare::ApiCreds {
    pub_key: "YOUR_PUBLIC_KEY".to_string(),
    secret_key: "YOUR_SECRET_KEY".to_string(),
}).unwrap();
// creating upload client
let upload_config = ucare::UploadConfig {
    sign_based_upload: true,
};
let upload_client = ucare::UploadClient::new(upload_config, ucare::ApiCreds {
    pub_key: "YOUR_PUBLIC_KEY".to_string(),
    secret_key: "YOUR_SECRET_KEY".to_string(),
}).unwrap();
```

## Usage example

For a comprehensive list of examples, check out the [API documentation](https://docs.rs/uploadcare/).
Below are a few usage examples:

```rust
let file_svc = file::new_svc(&rest_client);

let file_id = "b7c1bf20-0f4c-4ba4-b3a8-a74ebc663752";
let file_info = file_svc.info(file_id).unwrap();
println!("{}: {:?}", file_id, file_info);

let upload_svc = upload::new_svc(&upload_client);

let params = upload::FileParams {
    path: "/path/to/file".to_string(),
    name: "filename".to_string(),
    to_store: Some(upload::ToStore::Auto),
};
let file = upload_svc.file(params).unwrap();

// HashMap<String, String> — keys: filenames, values: UUIDs
println!("uploaded: {:?}", file);

```

## Full documentation

Read the full documentation on [GitHub](https://github.com/uploadcare/uploadcare-rust).

## Related guides

* [Golang API client](/docs/integrations/golang/)