> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ralphstudio.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Direct access to the Alephium node through your Ralph Studio endpoint.

The RPC API is a direct proxy to the Alephium full node. Every endpoint the Alephium node exposes is available through your Ralph Studio slug, no extra configuration needed.

## Base URL

```
https://rpc.ralphstudio.xyz/{slug}
```

All requests go through this URL. The path after your slug maps directly to the Alephium node API.

For example, to call `/infos/version` on the node:

```bash theme={null}
curl https://rpc.ralphstudio.xyz/{slug}/infos/version \
  -H "Authorization: Bearer API_KEY"
```

## WebSocket

For subscriptions and real-time data, use the WebSocket URL:

```
wss://rpc.ralphstudio.xyz/{slug}
```

## Networks

Your app is tied to a network when you create it. Mainnet apps route to the mainnet node, testnet apps route to the testnet node. You can't switch networks on an existing app, create a separate app for each network.

## Request format

All requests follow the standard Alephium node API format:

* `GET` requests pass parameters as query strings
* `POST` requests send JSON in the request body
* All responses are JSON

```bash theme={null}
# GET with query params
curl "https://rpc.ralphstudio.xyz/{slug}/blockflow/chain-info?fromGroup=0&toGroup=0" \
  -H "Authorization: Bearer API_KEY"

# POST with JSON body
curl -X POST "https://rpc.ralphstudio.xyz/{slug}/transactions/build" \
  -H "Authorization: Bearer API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "fromPublicKey": "...",
    "destinations": [...]
  }'
```

## Response format

Responses come back exactly as the Alephium node returns them. Ralph Studio does not modify the response body.

When a request fails at the node level you get the node's error response:

```json theme={null}
{
  "detail": "Invalid value for: query parameter toGroup"
}
```

When a request fails at the Ralph Studio level (auth, rate limit, etc.) you get:

```json theme={null}
{
  "success": false,
  "error": "Invalid or revoked API key"
}
```

## Status codes

| Code | Meaning                            |
| ---- | ---------------------------------- |
| 200  | Success                            |
| 400  | Bad request: check your parameters |
| 401  | Missing or invalid API key         |
| 429  | Rate limit exceeded                |
| 500  | Node error or unreachable          |

## Compute units

Every request consumes compute units (CU). Your plan includes a monthly CU allowance. Different endpoints cost different amounts:

| Request type                | Cost     |
| --------------------------- | -------- |
| Basic read (infos, version) | 5 CU     |
| Address balance             | 10 CU    |
| Transaction query           | 15–20 CU |
| Contract state              | 15 CU    |
| Transaction submit          | 100 CU   |
| Contract execution          | 80 CU    |

You can track your CU usage in the dashboard.
