# Make your first API request

Verify your key, run a chemistry check, then retrieve reaction evidence.

Canonical: https://docs.cyberrxn.com/en/docs/quickstart

This guide uses cURL without an SDK. Prefer a typed client? Use the [Python](/en/docs/sdk/python) or [JavaScript](/en/docs/sdk/javascript) quickstart. For a no-code connection, follow [MCP setup](/en/docs/mcp).

## 1. Create a workspace key

Sign in to the [CyberRXN app](https://app.cyberrxn.com/en), select your workspace, then open [API keys](https://app.cyberrxn.com/en/keys). Create a key with permission for the operations below, including usage reads. Copy the secret when it is shown and supply it as the `CYBERRXN_API_KEY` environment variable in your private shell or secret manager.

A test key uses a separate sandbox allowance; a live key uses your workspace's live allowance and prepaid balance. [Authentication](/en/docs/api/keys) explains the distinction. Never paste the key into an assistant conversation or public browser code.

## 2. Confirm access without spending a chemistry call

```bash
curl --fail-with-body --silent --show-error \
  'https://api.cyberrxn.com/v1/usage' \
  -H "Authorization: Bearer $CYBERRXN_API_KEY"
```

A successful response includes fields such as `period`, `included_calls` and `used_calls`. This endpoint is non-billable. An HTTP 401 means the credential is missing or invalid; a 403 means the credential lacks access. Fix that before continuing. Do not use `GET /v1/me` to test an API key: that endpoint requires the app's own session.

## 3. Run a reproducible chemistry check

```bash
curl --fail-with-body --silent --show-error \
  'https://api.cyberrxn.com/v1/chemistry/validate' \
  -H "Authorization: Bearer $CYBERRXN_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{"reaction_smiles":"CCO>>CC=O","mode":"strict"}'
```

This supplied equation loses two hydrogen atoms. Expect HTTP 200 with `valid: false` and atom-balance diagnostics. You have successfully called the API: a negative chemistry verdict is data. The check consumes one successful metered call. An error response instead contains a stable `code` and `request_id`; see [recovery](/en/docs/api/errors).

## 4. Find a source-backed preparation

```bash
curl --fail-with-body --silent --show-error \
  'https://api.cyberrxn.com/v1/molecules/reactions' \
  -H "Authorization: Bearer $CYBERRXN_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{"smiles":"CCN1CCN(CO)C(=O)C1=O","role":"product","limit":3}'
```

Read the `items` array. Each item contains an `observation_id`; an empty array means this query found no observations. Use an ID actually returned by your response with [GET /v1/observations/ID](/en/docs/api/reference/get-observation), URL-encoding the path value.

The full record contains `paragraph_text`, `conditions` and `evidence`. Verify conditions against the source paragraph; pressure can belong to a drying step rather than the reaction. The [task recipes](/en/docs/recipes) show complete search-and-fetch code without manually copying an ID.

## Next steps

- [Install an SDK](/en/docs/installation) for typed models, pagination and request errors.
- [Choose a search](/en/docs/chemistry/search): molecule, exact transformation or filtered reactions.
- [Control usage](/en/docs/api/usage) and [request rate](/en/docs/api/rate-limits) before running a batch.
- [Browse the API reference](/en/docs/api/reference) for every supported field and operation.
