> For the complete documentation index, see [llms.txt](https://docs.bitplanet.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bitplanet.ai/reference/api.md).

# API Reference

Complete API reference documentation for interacting with Bitplanet blockchain.

## Overview

Bitplanet provides multiple API interfaces for different use cases:

| API Type                                   | Port | Use Case                          | Best For                               |
| ------------------------------------------ | ---- | --------------------------------- | -------------------------------------- |
| [**REST API**](/reference/api/rest-api.md) | 1317 | HTTP queries for blockchain state | Backend services, simple integrations  |
| [**gRPC**](/reference/api/grpc-api.md)     | 9090 | High-performance typed RPC        | Advanced clients, high-throughput apps |
| [**CLI**](/reference/api/cli-reference.md) | -    | Command-line interface            | Development, testing, node operations  |

## Choosing the Right API

* Use **REST API** when:
  * Building backend services with HTTP clients
  * Simple blockchain queries
  * Need human-readable HTTP endpoints
  * Prototyping and testing
* Use **gRPC** when:
  * Need high performance and low latency
  * Building production-grade services
  * Want strong typing with Protocol Buffers
  * Need streaming capabilities
* Use **CLI** when:
  * Local development and testing
  * Node operations and administration
  * Scripting and automation
  * Learning and exploration

## Network Endpoints

### Local Development

* Local endpoints are available when you run the local testnet.

```bash
Cosmos RPC:  http://localhost:26657
REST API:    http://localhost:1317
gRPC:        localhost:9090
gRPC-Web:    localhost:9091
```

### Public Testnet

* Check official documentation for current testnet endpoints.

### Mainnet

* Check official documentation for current mainnet endpoints.

## Authentication & Security

### Local Development

* No authentication required for local endpoints
* Private keys stored in keyring

### Production

* Use HTTPS/TLS for all connections
* Implement API key authentication if exposing endpoints
* Never expose private keys in code or logs
* Use environment variables for sensitive configuration

## Next Steps

* [**REST API Reference**](/reference/api/rest-api.md) - Complete REST endpoint reference
* [**gRPC API Reference**](/reference/api/grpc-api.md) - Complete gRPC service reference
* [**CLI Reference**](/reference/api/cli-reference.md) - Complete CLI command reference
* [**Quick Start**](/developer-guides/quick-start.md) - Learn how to use these APIs

***

**Related:**

* [Developer Guides](/developer-guides/developer-guides.md)
* [Module API](/developer-guides/module-api.md)
* [Smart Contract Integration](/developer-guides/smart-contract.md)
* [Node Operation](/node-operation/node-operation.md)
