Skip to content

Translate a Story by AI

Terminal window
https://mapi.storyblok.com/v1/spaces/:space_id/stories/:story_id/ai_translate

This endpoint returns the story content, translated by AI.

  • :space_id required number

    Numeric ID of a space

  • :story_id required number

    Numeric id of story

  • lang string

    The official language code (e.g., en, de, fr) used for localization.

  • code string

    The custom language identifier defined in the Space Settings under Internationalization.

  • overwrite boolean

    Indicates whether the current value should replace the existing value for the specified language.

  • release_id number

    Release ID of the story.

  • story The Story Object

    A single story object, containing the translated fields in its content property.

curl "https://mapi.storyblok.com/v1/spaces/606/stories/536503907/ai_translate" \
-X PUT \
-H "Authorization: YOUR_OAUTH_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"code\":\"fr\",\"lang\":\"fr\",\"overwrite\":true,\"release_id\":0}"

You will receive a single story object, containing the translated fields in its content property.