> For the complete documentation index, see [llms.txt](https://docs.saga.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.saga.xyz/sagacli/working-with-chainlet/chainlet-apis-and-blockexplorer.md).

# Chainlet APIs & BlockExplorer

Every chainlet that is launched also makes additional resources available using which you can interact with the chainlet.

Currently, `sagacli` provides the following types of endpoints:

1. **Websocket endpoint** - you can send websocket requests and subscribe to channels using the websockets endpoint
2. **BlockExplorer** - Paste the explorer endpoint URL in a web browser and you should be able to see a block explorer connected to your chainlet. This can be used for searcing for, and viewing, transactions, seeing commit data, blocks info, and more.
3. **JSON RPC** endpoint - use this endpoint to make `jsonrpc` calls to your chainlet

The APIs can be viewed using the `chainlet apis` command:

```
sagacli chainlet apis <chain id>
```

## API Example (Testnet)

```bash
$ sagacli chainlet apis chainlet_1698372536493619-1
Name         Endpoint                                                       Status        
----         --------                                                       ------        
explorer     chainlet-1698372536493619-1.testnet.sagaexplorer.io            Available     
ws           chainlet-1698372536493619-1.ws.testnet.sagarpc.io              Available     
jsonrpc      chainlet-1698372536493619-1.jsonrpc.testnet.sagarpc.io         Available 
```

## API Example (Mainnet)

```bash
$ sagacli chainlet apis chainlet_1698372536493619-1
Name         Endpoint                                                       Status        
----         --------                                                       ------        
explorer     chainlet-1698372536493619-1.sagaexplorer.io                    Available     
ws           chainlet-1698372536493619-1.ws.sagarpc.io                      Available     
jsonrpc      chainlet-1698372536493619-1.jsonrpc.sagarpc.io                 Available 
```

{% hint style="info" %}
The apis command will list the service names and endpoints that allow you to connect to your chainlet JsonRPC, WS or BlockExplorer. The status value will show if the service is available or is still being provisioned.
{% endhint %}

## Further Details

For further details and options on using the `chainlet apis` command, refer to

```
sagacli chainlet apis --help
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.saga.xyz/sagacli/working-with-chainlet/chainlet-apis-and-blockexplorer.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
