> ## 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.

# Your First Request

> Make a working API call to your Alephium node in under 5 minutes.

This guide walks you through making your first request to Ralph Studio's RPC API.
By the end you'll have a working call that returns the current block height of the Alephium network.

## Before you start

You need two things:

* Your **API key**: find it in the Ralph Studio dashboard under Settings → API Keys
* Your **node slug**: the unique identifier for your node, shown on the Nodes page

Both look like this:

```

API key: rsk_live_a1b2c3d4e5f6...
Slug: my-alephium-node

```

## Step 1: Make the request

```bash theme={null}
curl "https://rpc.ralphstudio.xyz/my-alephium-node/blockflow/chain-info?fromGroup=0&toGroup=0" \
  -H "Authorization: Bearer rsk_live_a1b2c3d4e5f6..."
```

## Step 2: Read the response

```json theme={null}
{
  "currentHeight": 847392
}
```

`currentHeight` is the number of blocks mined on the chain from group 0 to group 0.
Alephium has 16 chains (4 groups × 4 groups), so each `fromGroup`/`toGroup` pair
has its own independent height.

## Step 3: Handle errors

If something is wrong you'll get a structured error:

```json theme={null}
{
  "detail": "You shall not pass"
}
```

| HTTP status | Meaning                    | Fix                                        |
| ----------- | -------------------------- | ------------------------------------------ |
| `401`       | Missing or invalid API key | Check the `Authorization` header           |
| `404`       | Slug not found             | Check your slug spelling on the Nodes page |
| `503`       | Node is syncing            | Wait a moment and retry                    |

## Step 4: Try a few more calls

**Get node version**

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

**Get ALPH balance for an address**

```bash theme={null}
curl "https://rpc.ralphstudio.xyz/{your-slug}/addresses/{address}/balance" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

**Get latest blocks**

```bash theme={null}
curl "https://rpc.ralphstudio.xyz/{your-slug}/blockflow/blocks?fromTs=1748390400000&toTs=1748476800000" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Base URL structure

Every request follows the same pattern:

```
https://rpc.ralphstudio.xyz/{your-slug}/{node-path}
```

* `{your-slug}`: your node identifier, never changes
* `{node-path}`: any path from the [Alephium node API](/rpc-api/overview), passed through as-is

The indexer API uses a different prefix:

```
https://rpc.ralphstudio.xyz/{your-slug}/indexer/{indexer-path}
```

## Next steps

<CardGroup cols={2}>
  <Card title="Query an address balance" icon="wallet" href="/guides/querying-balance">
    Get ALPH and token balances for any address
  </Card>

  <Card title="Submit a transaction" icon="paper-plane" href="/guides/submitting-transaction">
    Build, sign, and broadcast a transfer
  </Card>

  <Card title="Read a contract" icon="file-code" href="/guides/reading-contracts">
    Call view functions on deployed contracts
  </Card>

  <Card title="Error handling" icon="triangle-exclamation" href="/guides/error-handling">
    Retry logic and error code reference
  </Card>
</CardGroup>
