# Integrate api keys

{% code fullWidth="false" expandable="true" %}

```typescript
import { createNetwork } from '@stacks/network'

// Create a network with options object
const network = createNetwork({
  network: 'mainnet',
  apiKey: 'my-api-key',
});
```

{% endcode %}

### Description

Configure Stacks.js to use API keys for enhanced rate limits and monitoring

### Use Cases

* Increased API rate limits for production applications
* API usage monitoring and analytics
* Priority access during high traffic periods
* Custom enterprise support features

### Key Concepts

* **Higher rate limits** - 500 requests/minute vs 50 for anonymous
* **Usage tracking** - Monitor your API consumption
* **Priority queue** - Better performance during peak times
* **Support** - Access to dedicated support channels


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stacks.co/cookbook/stacks.js/cryptography-and-security/integrate-api-keys.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
