> For the complete documentation index, see [llms.txt](https://docs.quadrata.com/integration/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.quadrata.com/integration/how-to-integrate/quadrata-sdk/advanced/api-libraries/api-service-options.md).

# API Service Options

Each API service will have different options that you can pass in.&#x20;

Each service allows you to pass in options mapped to [`RequestInit`](https://developer.mozilla.org/en-US/docs/Web/API/fetch#options) which are passed to the underlying `fetch` function. You can use this option to control `cache` behavior, add `headers`, and more.

## **Runtime Environment and Allow Unsafe Client API Call**

Some API calls are intended to only be executed on the server.

Of these API calls that are only intended to be executed on the server, some of them allow you to pass an option to `allowUnsafeClientApiCall`. This option is a boolean that allows you to bypass the server check and execute the API call on the client.

{% hint style="warning" %}
Any service that requires a private key and generates a signed request does not allow you to pass this option.
{% endhint %}

### Example

```typescript
import { createAccessToken, QuadrataEnvironment } from '@quadrata/sdk/api';

const { data: { accessToken } } = await createAccessToken(
    // params
    {
        apiKey: process.env.QUADRATA_API_KEY,
        options: {
            // not recommended as it exposes your API key
            allowUnsafeClientApiCall: true,

            // optional fetch options
            cache: 'no-cache'
        }
    },
    // sdk config
    { environment: QuadrataEnvironment.PRODUCTION }
);
```

## API Signed Requests

When using a service that generates a request signature, you must pass in your private key.

You have options as to how you can pass in your private key:

* **`privateKeyPem`**: A string that contains the private key in PEM format.
* **`privateKeyDerBase64`**: A base64 encoded string that contains the private key in DER format.
* **`privateKeyDer`**: A binary string that contains the private key in DER format.
* **`privateKey`**: A [`CryptoKey`](https://developer.mozilla.org/en-US/docs/Web/API/CryptoKey) object that contains the private key. (Uses [`SubtleCrypto`](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto))

### Example

```typescript
import { fetchWalletScreening, QuadrataEnvironment } from '@quadrata/sdk/api';

const { data } = await fetchWalletScreening(
    // params
    {
        apiKey: process.env.QUADRATA_API_KEY,
        privateKeyDerBase64: process.env.QUADRATA_PRIVATE_KEY_DER_BASE64,
        walletAddress: '0x123',
        
        // optional fetch options
        options: {
            cache: 'no-cache'
        }
    },
    // sdk config
    { environment: QuadrataEnvironment.PRODUCTION }
);
```


---

# 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 dynamically by asking a question.

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

```
GET https://docs.quadrata.com/integration/how-to-integrate/quadrata-sdk/advanced/api-libraries/api-service-options.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
