Rapidata Translation API

The Translation API from Rapidata — 2 operation(s) for translation.

OpenAPI Specification

rapidata-translation-api-openapi.yml Raw ↑
openapi: 3.0.4
info:
  title: Rapidata Asset Translation API
  description: The API for the Rapidata Asset service
  version: v1
servers:
- url: https://api.rapidata.ai/
tags:
- name: Translation
  x-displayName: Translation
paths:
  /translation/ensure-english:
    post:
      tags:
      - Translation
      summary: Ensures the provided text is in English, returning a suggested English text when it isn't.
      requestBody:
        description: The text to verify.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnsureEnglishEndpoint_Input'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnsureEnglishEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /translation:
    post:
      tags:
      - Translation
      summary: Translates text from one language to another using the specified translator.
      requestBody:
        description: The translation request body.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TranslateEndpoint_Input'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TranslateEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
components:
  schemas:
    TranslateEndpoint_Input:
      required:
      - translator
      - text
      - targetLanguage
      type: object
      properties:
        translator:
          allOf:
          - $ref: '#/components/schemas/TranslatorType'
          description: The type of translator to use.
        text:
          type: string
          description: The text to translate.
        targetLanguage:
          type: string
          description: The language to translate the text into.
        sourceLanguage:
          type: string
          description: The original language of the text.
    EnsureEnglishEndpoint_Output:
      required:
      - englishText
      type: object
      properties:
        englishText:
          type: string
          description: The English version of the provided text.
    TranslateEndpoint_Output:
      required:
      - translation
      - sourceLanguage
      - targetLanguage
      type: object
      properties:
        translation:
          type: string
          description: The translated text.
        sourceLanguage:
          type: string
          description: The detected or provided source language of the text.
          nullable: true
        targetLanguage:
          type: string
          description: The language the text was translated into.
    TranslatorType:
      enum:
      - Google
      - Deepl
      - OpenAi
      - OpenAi4O
      - OpenAi4OMini
      - LibreTranslate
      - Gemini
      - Tllm
    ValidationProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
    EnsureEnglishEndpoint_Input:
      required:
      - text
      type: object
      properties:
        text:
          type: string
          description: The text to ensure is English.
  securitySchemes:
    OpenIdConnect:
      type: openIdConnect
      description: OpenID Connect connection flow
      openIdConnectUrl: https://auth.rapidata.ai/.well-known/openid-configuration
x-tagGroups:
- name: Rapidata Asset API
  tags:
  - Asset
  - BatchUpload
- name: Rapidata Audience API
  tags:
  - Audience
  - Examples
- name: Rapidata Campaign API
  tags:
  - Cache
  - Campaign
  - ExternalAudience
- name: Rapidata Dataset API
  tags:
  - ContextShortening
  - Datapoints
  - Dataset
  - DatasetGroup
- name: Rapidata Flow API
  tags:
  - Flow
  - FlowItem
  - RankingFlow
  - RankingFlowItem
- name: Rapidata Identity API
  tags:
  - Rapidata.Identity.API
  - Client
  - Customer
  - Identity
  - Newsletter
  - Organization
  - Survey
- name: Rapidata Leaderboard API
  tags:
  - Benchmark
  - SampleGeneration
  - Faucet
  - Replicate
  - Leaderboard
  - Participant
  - Prompt
  - Sample
- name: Rapidata Order API
  tags:
  - Feedback
  - Job
  - Order
- name: Rapidata Payment API
  tags:
  - Billing
  - ExternalServicePrices
  - Reconciliation
  - Settings
  - VolumeDiscount
  - BillingAccount
  - Invoice
  - Payment
- name: Rapidata Pipeline API
  tags:
  - Pipeline
- name: Rapidata Rapid API
  tags:
  - CustomerRapid
  - GlobalText
  - Rapid
  - UserRapid
  - ValidationFeedback
- name: Rapidata Signal API
  tags:
  - Signal
- name: Rapidata Translation API
  tags:
  - Translation
- name: Rapidata Validation API
  tags:
  - ValidationSet
- name: Rapidata Workflow API
  tags:
  - Evaluation
  - GroupedRanking
  - Ranking
  - SimpleWorkflow
  - Workflow