# API Reference

We offer a powerful REST API to interact with your Cosmic content. We recommend using one of the available SDKs which provide an enhanced development experience.

## [API base URL](/content/docs/api#api-base-url/index.html)

The base URL for all requests is noted below.

### Base URL

```bash
http://api.cosmicjs.com
```

## [API status](/content/docs/api#api-status/index.html)

You can check the API status at the following endpoint. You can also subscribe to status updates on the [Cosmic status page](http://cosmicstatus.com/).

### Status endpoint

```bash
http://api.cosmicjs.com/v3/status
```

## [Install the JavaScript SDK](/content/docs/api#install-the-java-script-sdk/index.html)

The following examples include methods using the [Cosmic JavaScript SDK](https://www.npmjs.com/package/@cosmicjs/sdk). To run the examples, first install the NPM module using one of the following commands. Make sure you have [Node.js](https://nodejs.org/en) installed on your machine (recommended version: `v18.*`).

### Install the Cosmic JavaScript SDK

```bash
yarn add @cosmicjs/sdk
# OR
pnpm add @cosmicjs/sdk
# OR
npm install @cosmicjs/sdk
# OR
bun add @cosmicjs/sdk
```

## [Install the Swift SDK](/content/docs/api#install-the-swift-sdk/index.html)

In certain cases, there are also methods that use the [Cosmic Swift SDK](https://github.com/cosmicjs/cosmic-sdk-swift). To run the examples, first install the Swift package using Swift Package Manager.

### Install the Cosmic Swift SDK

```bash
.package(url: "https://github.com/cosmicjs/cosmic-sdk-swift.git", from: "1.0.0")
```
