POST
/api/v1/ai/pages/{slug}/translateTranslate a page
Translates a page you can edit into lang as a new page next to it, titled with the language's name, with the same blocks, embeds and properties. The original doesn't change. Returns the new page's slug, url and title; send Accept: text/event-stream to get progress events while it works.
Guide: AI in pages
Code samples and Try itPath parameters
#slugstringRequiredThe document's address: the part after
markdrop.in/.
Headers
#X-Edit-SecretstringThe document's edit secret (
sk_…), for a document published without an account. See Edit key.
Request body
#application/json, required
langstringRequiredThe language, in English:
Spanish,Japanese,Chinese (Simplified)and so on. Check AI availability lists them. Up to 40 characters.
Responses
#200OK.401No token, or the token is revoked or mistyped.422The request didn't validate.detaillists each problem, with where it is (loc) and why (msg).429Too many requests from your IP address. Wait the seconds inRetry-After.