# Quickstart

Make your first successful API call in under two minutes.

1. Open [the developer dashboard](https://metaphrase.msalman.com/dashboard), create an account, and sign in.
2. Select **Create API key**, name it, and copy the full key. It is shown once.
3. Set `METAPHRASE_API_KEY` in your backend environment. Keep it out of frontend code, mobile apps, public repositories and AI chat prompts.

```bash
export METAPHRASE_API_KEY='paste_your_new_secret_key_here'
curl --fail-with-body --silent --show-error \
  'https://metaphrase.msalman.com/api/v1/grammar' \
  -H "Authorization: Bearer $METAPHRASE_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{"text":"The best ideas deserves to be shared.","language":"en-US"}'
```

The response contains `result.text` equal to `The best ideas deserve to be shared.`, a `matches` array, `request_id`, and `usage.total_tokens: 0`. Grammar runs on MetaPhrase's own LanguageTool server and requires no writing-provider credential from you. An identical request may be served from cache.

The origin is `https://metaphrase.msalman.com`. The REST base is `https://metaphrase.msalman.com/api/v1`. Endpoint paths are `/paraphrase`, `/grammar`, `/detect`, `/translate`, `/summarize`, and `/cite`. SDK `base_url` accepts the **origin**, without `/api/v1`.

All six endpoints accept POST JSON with snake_case fields and the same Bearer key. Omit optional fields instead of sending null. Unknown fields are rejected. The current maximum input length is 20000 Unicode code points. Use [the endpoint references](https://metaphrase.msalman.com/docs/paraphrase.md), [OpenAPI JSON](https://metaphrase.msalman.com/openapi.json), or [the entire documentation](https://metaphrase.msalman.com/llms-full.txt).

For a first paraphrase, replace `/grammar` with `/paraphrase` and use `{"text":"Good writing helps people understand an idea.","mode":"standard","synonym_strength":50}`. If it returns `provider_not_configured` (503), the operator must add a writing-provider key; changing your integration will not fix that deployment setting. Grammar, citation and `summarize` with `format: "key_sentences"` work independently.

For a website, use the [complete HTML and backend proxy recipe](https://metaphrase.msalman.com/docs/recipe-html.md). Never call the secret-key API directly from frontend code. For a drop-in tool use [the public widget](https://metaphrase.msalman.com/docs/widget.md).
