# Getting started with the API
URL: https://metorial.com/docs/build/api

Learn how to use the Metorial API, get your API keys, and make your first request

---

Welcome to the Metorial API! This guide will help you quickly understand how to start using our API and make your first requests.

<Callout type="note">
  **What you'll learn:**

  * How to use the Metorial API
  * How to get your API key
  * How to make your first API request

  **Recommended reading:**

  * [Integrations overview](/docs/platform/integrations)
</Callout>

## Before you begin: Getting your API key [#before-you-begin-getting-your-api-key]

To use the Metorial API, you'll need an API key. You can generate these in two types:

**Publishable API Keys** (`metorial_pk_`):

* Used for public data access
* Safe to use in client-side code
* Starts with `metorial_pk_`

**Secret API Keys** (`metorial_sk_`):

* Provides full project access
* Must be kept private
* Starts with `metorial_sk_`

<Callout type="note">
  You can generate both publishable and secret API keys in your Metorial
  dashboard by navigating to **Developer** → **API Keys** and clicking **Create
  API Key**.
</Callout>

<img alt="API Keys page in Metorial dashboard" src="__img0" />

<img alt="Create API Key dialog in Metorial dashboard" src="__img1" />

## Making your first API request [#making-your-first-api-request]

When making a request, you'll always use this base URL:

```text
https://api.metorial.com
```

To authenticate, include your API key in the request header:

```http
Authorization: Bearer metorial_sk_abc123
```

Here's a simple request to list your provider deployments:

<Shell>
  <Command>
    {`curl -X GET https://api.metorial.com/provider-deployments \\
        -H "Authorization: Bearer metorial_sk_abc123"`}
  </Command>

  <Output>
    {`{
      "object": "list",
      "data": [
        {
          "object": "provider.deployment",
          "id": "pdp_abc123",
          "status": "active",
          "name": "Exa Search"
        }
      ],
      "has_more_before": false,
      "has_more_after": false
      }`}
  </Output>
</Shell>

## Full API reference [#full-api-reference]

You can view the detailed API reference [here](https://metorial.com/api).

## Client libraries [#client-libraries]

We make integration super easy with official SDKs for:

<Cards columns="2">
  <Card title="JavaScript" icon="js" href="/docs/build/sdk/javascript">
    Use Metorial with JavaScript or TypeScript.
  </Card>

  <Card title="Python" icon="python" href="/docs/build/sdk/python">
    Use Metorial with Python.
  </Card>
</Cards>

## Important things to know [#important-things-to-know]

### Rate limits [#rate-limits]

We have some basic usage limits to keep things fair:

* 1000 requests per IP every 10 seconds
* Development environments: 100 requests per 10 minutes
* Production environments: 5000 requests per 10 minutes

### Handling responses [#handling-responses]

Our API uses standard HTTP response codes:

* `200`: Success!
* `400`: Something's wrong with your request
* `401`: Invalid API key
* `403`: Not enough permissions
* `404`: Can't find what you're looking for
* `429`: You've hit the rate limit

### Pagination [#pagination]

When fetching lists of items, we support cursor-based pagination. Each response includes `has_more_before`, `has_more_after`, and pagination cursors to help you fetch more items easily.

## Need more help? [#need-more-help]

Check out our full documentation or reach out to our support team. Happy coding!

<Card title="SDK documentation" icon="book" href="/docs/build/quickstart">
  Explore SDKs for easier integration.
</Card>