Quickstart
Make your first successful API call in under two minutes.
- Open the developer dashboard, create an account, and sign in.
- Select Create API key, name it, and copy the full key. It is shown once.
- Set
METAPHRASE_API_KEYin your backend environment. Keep it out of frontend code, mobile apps, public repositories and AI chat prompts.
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, OpenAPI JSON, or the entire documentation.
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. Never call the secret-key API directly from frontend code. For a drop-in tool use the public widget.