---
title: "Sui RPC Quickstart"
description: "Get an API key and configure the binary gRPC-web transport to call Sui with ERPC."
canonical: "https://erpc.global/en/doc/sui-rpc/quickstart/"
locale: "en"
---

# Sui RPC Quickstart

## Sui RPC Quickstart

This guide takes you from zero to a configured Sui gRPC-web transport with ERPC.

### 1. Get Your API Key

You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en)

Already using ERPC for Solana, Ethereum, or Avalanche? You can use the same RPC key.

### 2. Configure the gRPC-web Transport

Sui is served over binary gRPC-web (`application/grpc-web+proto`), one unary call per HTTP request. Configure a `GrpcWebFetchTransport` with the ERPC base URL and your API key as a Bearer token:

```ts
import { GrpcWebFetchTransport } from '@protobuf-ts/grpcweb-transport'

const transport = new GrpcWebFetchTransport({
  baseUrl: 'https://sui.erpc.global', // or https://edge.erpc.global/sui
  format: 'binary',
  meta: { Authorization: 'Bearer <YOUR_API_KEY>' },
})
```

Pass this transport to the unary service client generated for the Sui gRPC API. The client appends `/sui.rpc.v2.<Service>/<Method>` to `baseUrl`, for example `/sui.rpc.v2.LedgerService/GetServiceInfo`. Because the SDK appends the path to the base URL, the API key goes in the `Authorization` header instead of the `api-key` query parameter.

Only unary calls over binary gRPC-web are supported. JSON-RPC requests, native gRPC, text-format gRPC-web, and streaming are not.

### Next Steps

- Endpoints, metering, and status codes: [Sui RPC Endpoint Documentation](https://erpc.global/en/doc/sui-rpc/general/)
- Official Sui documentation: [https://docs.sui.io/references/sui-api](https://docs.sui.io/references/sui-api)
