> ## Documentation Index
> Fetch the complete documentation index at: https://docs.critique-labs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# API Studio

> Create, test, and integrate a private API from the browser

## Overview

API Studio turns a natural-language description into a private, callable research
endpoint. The manual builder is available at
[critique-labs.ai/en/design](https://critique-labs.ai/en/design).

If you want a coding agent to create and integrate the endpoint for you, select
**Set up an agent** beside the API description form. You can copy the setup
prompt, open it in ChatGPT or Claude, or follow the per-tool steps for Claude
Code, Cursor, and Codex to install the downloadable skill package.

> [!NOTE]
>
> The manual builder and agent workflow create the same kind of private API.
> Endpoints created by an agent appear under **Saved designs** in API Studio.

## Creating an API

**1. Describe Your API**

Write a natural language description of your desired API functionality:

* Purpose and use cases
* Required inputs and exact output fields
* Research behavior and preferred sources
* How to handle missing or conflicting information

**2. Configure Settings**

Customize your API configuration:

* Input request format
* Output response format
* Detailed API instructions

**3. Test Your API**

Test your API with sample requests and responses:

* Enter an input request
* View the output response
* Review the returned source context
* Revise API instructions if needed

**4. Integrate**

In the **Run** step, copy the endpoint URL, request schema, example payload,
or generated JavaScript, Python, and cURL code. Keep the API key in the
`CRITIQUE_API_KEY` environment variable.

## Versions

Every saved API is versioned. The Studio header shows the version you are
editing (`v1`, `v2`, ...) and its state:

* **Live**: the version the unversioned endpoint URL runs. A freshly created
  API is live and still editable, so edits go live immediately until you
  release it.
* **Released**: immutable. Select **Release** to lock a version in; from then
  on the unversioned URL runs the newest released version.
* **Draft**: an editable working copy that is not live, created with **New
  version** after a release. It runs only at its pinned `/v{n}` URL until you
  release it.

Select **New version** to copy the current version into a new draft (if the
current version is the draft, it is released first). An API can have only one
draft at a time. Publishing a version to the marketplace also releases it, and
older versions stay callable at their pinned URLs. The **Run** step always shows
the URL that runs the version you are looking at.

## Build with an agent

See [Build APIs with an agent](https://docs.critique-labs.ai/api-platform/agent-created-apis.md) for setup,
endpoint lifecycle commands, and the runtime response contract.

## Best Practices

### Writing Descriptions

* Be specific about functionality
* Name every required input
* Define the exact output shape and value types
* State freshness and source requirements
* Explain how to represent missing information

### Testing

* Validate all endpoints
* Test edge cases
* Check error responses
* Verify rate limits

## Pricing

* **\$0.50 per million tokens** (including internal processing tokens).
* Rate limits exist for the free and pro tiers. See [API rate limits](https://docs.critique-labs.ai/api-reference/rate-limits.md) and the [pricing page](https://critique-labs.ai/en/pricing) for details.

Use the **API Reference** navigation to inspect the complete HTTP specification.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.