Prismy Public API

The Public API provides access to Prismy’s translation engine and glossary management features.

Generate Translations API

Generate AI-powered translations for your text content using Prismy’s translation engine.

Endpoint

POST /api/public/generate-translations

Authentication

This endpoint requires API token authentication. You need to:
  1. Generate an API token from your organization settings in the Prismy dashboard
  2. Include the token in the Authorization header of your requests

Headers

HeaderValueDescription
AuthorizationBearer {your-api-token}Your organization’s API token
Content-Typeapplication/jsonRequired for JSON request body

Request Body

ParameterTypeRequiredDefaultDescription
targetLanguagestring-The language code to translate to (e.g., “fr-FR”, “es-ES”, “de-DE”)
sourceLanguagestring-The language code of the source text (e.g., “en-US”, “fr-FR”, “es-ES”)
textsToTranslatestring[]-Array of text strings to translate
useOrgDescriptionbooleantrueUse organization description for context
useGlossarybooleantrueUse organization glossary for consistent terminology
useSimilaritybooleantrueUse similarity matching for better translations
useCustomInstructionsbooleantrueUse custom translation instructions
instructionsSourcestring"github"Source of custom instructions
instructionsBundlestring""Bundle name for instructions
instructionsRepositorystring""Repository name for instructions
additionalInstructionsstring""Additional custom instructions

Example Request

curl -X POST https://api.prismy.io/api/public/generate-translations \
  -H "Authorization: Bearer your-api-token-here" \
  -H "Content-Type: application/json" \
  -d '{
    "targetLanguage": "fr-FR",
    "sourceLanguage": "en-EN",
    "textsToTranslate": [
      "Welcome to our application",
      "Click here to get started",
      "Your account has been created successfully"
    ],
    "useOrgDescription": true,
    "useGlossary": true,
    "useSimilarity": true,
    "useCustomInstructions": true,
    "instructionsSource": "github",
    "instructionsRepository": "my-repo",
    "instructionsBundle": "web-app",
    "additionalInstructions": "Keep the tone professional and friendly"
  }'

Request Body Only

{
  "targetLanguage": "fr",
  "sourceLanguage": "en",
  "textsToTranslate": [
    "Welcome to our application",
    "Click here to get started",
    "Your account has been created successfully"
  ],
  "useOrgDescription": true,
  "useGlossary": true,
  "useSimilarity": true,
  "useCustomInstructions": true,
  "instructionsSource": "github",
  "instructionsRepository": "my-repo",
  "instructionsBundle": "web-app",
  "additionalInstructions": "Keep the tone professional and friendly"
}

Response

Success Response (200)

Returns an array of translated strings in the same order as the input:
[
  "Bienvenue dans notre application",
  "Cliquez ici pour commencer",
  "Votre compte a été créé avec succès"
]

Error Responses

Rate Limited (429)

{
  "message": "You have reached the limit of AI translations for this month, do not hesitate to contact us."
}

Features

Organization Description

When useOrgDescription is enabled, the translation engine uses your organization’s description to provide better context and maintain brand consistency.

Glossary Integration

When useGlossary is enabled, the system automatically extracts terms from your source texts and applies consistent translations based on your organization’s glossary.

Similarity Learning

When useSimilarity is enabled, the system leverages previously translated similar content to improve translation quality and consistency.

Custom Instructions

When useCustomInstructions is enabled, you can specify:
  • Instructions Source: Where to pull instructions from (e.g., “github”)
  • Repository: Specific repository for instructions
  • Bundle: Specific bundle/project within the repository
  • Additional Instructions: Extra context or requirements for the translation

Glossary Public API

Overview

The Glossary API provides access to translation glossary terms and their descriptions.

Endpoint

GET /api/public/glossary

Authentication

This endpoint requires API token authentication. You need to:
  1. Generate an API token from your organization settings in the Prismy dashboard
  2. Include the token in the Authorization header of your requests

Headers

HeaderValueRequiredDescription
Content-Typeapplication/jsonYesRequired content type
AuthorizationBearer {your-api-token}YesYour organization’s API token

Example Request

curl 'https://app.prismy.io/api/public/glossary' \
  -H "Content-Type: application/json" \
  -H 'Authorization: Bearer your-api-token-here'

Response

Success Response (200)

The API returns a JSON array of glossary terms, where each term contains:
  • glossarytermsrowid: Unique identifier for the glossary term row
  • description: Optional description of the term
  • terms: Object containing translations for different languages
[
  {
    "glossarytermsrowid": 309,
    "description": "A description",
    "terms": {
      "en-US": {
        "glossaryTermID": 765,
        "value": "availability"
      },
      "fr-FR": {
        "glossaryTermID": 766,
        "value": "disponibilité"
      }
    }
  },
  {
    "glossarytermsrowid": 308,
    "description": null,
    "terms": {
      "en-US": {
        "glossaryTermID": 764,
        "value": "published"
      },
      "fr-FR": {
        "glossaryTermID": 767,
        "value": "publié"
      }
    }
  }
]

Response Fields

FieldTypeDescription
glossarytermsrowidintegerUnique identifier for the glossary term row
descriptionstringnullOptional description of the term
termsobjectObject containing translations for different languages

Terms Object Structure

Each language in the terms object contains:
FieldTypeDescription
glossaryTermIDintegerUnique identifier for the specific term
valuestringThe translated term value