---
title: "toJSON | TypeScript SDK | AEO API"
description: "Serialize the client configuration when you need to check which API origin an integration uses."
url: "https://aeoapi.dev/docs/sdks/typescript/toJSON"
canonical: "https://aeoapi.dev/docs/sdks/typescript/toJSON"
last_updated: "2026-11-30"
---

# toJSON

Serialize the client configuration when you need to check which API origin an integration uses.

## Signature

```
client.toJSON(): Record<string, string>
```

## Parameters

This method takes no arguments.

## Return value

An object with one field, baseUrl. JSON.stringify(client) calls this method and excludes the API key.

## Errors

- This method takes no input and makes no network request.

## TypeScript example

```
import { AeoClient } from "@aeoapi/aeo-sdk";

const apiKey = process.env.AEO_API_KEY;
if (!apiKey) throw new Error("Set AEO_API_KEY on your server.");
const client = new AeoClient(apiKey, { baseUrl: "https://api.aeoapi.dev" });

console.log(client.toJSON());
```

See [TypeScript client setup](https://aeoapi.dev/docs/sdks/typescript) for authentication, timeouts and retry settings.
