Skip to main content
Using a coding agent? Point it to docs.freeplay.ai/llms.txt for LLM-optimized documentation.

Installation

We offer the SDK in several popular programming languages.
The Python and TypeScript SDKs are open source. View the source, report issues, or contribute on GitHub: freeplay-python · freeplay-node

Freeplay Client

The Freeplay client object will be your point of entry for all SDK usage. For most users, the base freeplay domain will be https://app.freeplay.ai with api exposed at https://app.freeplay.ai/api.

Custom Domain

If your organization has been assigned a custom Freeplay domain it will look like this: https://acme.freeplay.ai and your SDK connection URL will have an additional /api appended to it (e.g., https://acme.freeplay.ai/api or https://app.freeplay.ai/api).
The api_base (Python) or baseUrl (Node.js) parameter is required and must match your Freeplay instance URL. Make sure to include the /api suffix for all domains.
Note the rest of the documentation will use https://app.freeplay.ai.

Authentication

Freeplay authenticates your API request using your API Key which can be managed through the Freeplay application at https://app.freeplay.ai/settings/api-access

Client Instantiation

The first step to using Freeplay is to create a client
Production Setup: For production deployments, consider using Prompt Bundling to fetch prompts from local files instead of the server. Many teams configure separate clients for different environments—server-based fetching for dev/staging, and bundled prompts for production.
For API rate limits and payload constraints, see Platform Limits.