Skip to main content
POST
/
v1
/
translate-transcript
Translate a call transcript
curl --request POST \
  --url https://api.getbluejay.ai/v1/translate-transcript \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <x-api-key>' \
  --data '
{
  "simulation_result_id": 123,
  "target_language": "en"
}
'
{
  "translated_transcript_url": "<string>",
  "target_language": "<string>",
  "success": true
}
Integration Prompt for AI Agents
# Bluejay — Testing & Monitoring Platform for Conversational AI Agents

You are a senior backend engineer integrating the Bluejay API. Think step-by-step: first understand the endpoint, then plan the integration, then implement with minimal changes.

## Translate Transcript — POST /v1/translate-transcript

> **What this endpoint does:** Translates all utterances in a simulation or production conversation transcript to the specified target language using Google Translate API.

**Endpoint:** POST `https://api.getbluejay.ai/v1/translate-transcript`
**Auth:** `X-API-Key` header
**Content-Type:** application/json

### Required Parameters
| Name | Type | Description |
|------|------|-------------|
| X-API-Key | string | API key required to authenticate requests. |

### Request Body
```json
{
  "simulation_result_id": 123,
  "target_language": "en"
}
```

### Example
**POST with body:**
```python
import requests

def translate_transcript(payload: dict, api_key: str) -> dict:
    url = "https://api.getbluejay.ai/v1/translate-transcript"
    headers = {"X-API-Key": api_key}
    response = requests.post(url, headers=headers, json=payload)
    response.raise_for_status()
    return response.json()
```

### Constraints
- Minimal changes — only add/change files needed for this integration.
- Match existing codebase patterns (naming, file structure, error handling).
- Include error handling for 422: Validation Error.

### Integration Checklist
Before writing code, verify:
1. Which module/service owns this API domain in the codebase?
2. What HTTP client and error-handling patterns does the project use?
3. Are there existing types/interfaces to extend?

Then implement the integration, export it, and confirm it compiles/passes lint.
This endpoint allows you to translate all utterances in a simulation or production conversation transcript to a specified target language using Google Translate API.

Headers

X-API-Key
string
required

API key required to authenticate requests.

Body

application/json

Translate a simulation transcript by providing the simulation result ID

simulation_result_id
integer
required

ID of the simulation result (test_result) to translate

target_language
string
default:en

Target language code (e.g., 'en', 'es', 'fr', 'de'). Defaults to 'en' (English).

Required string length: 2 - 10

Response

Successful Response

Response model for translated transcript.

translated_transcript_url
string
required

URL to the translated transcript file

target_language
string
required

The target language used for translation

success
boolean
default:true

Whether the translation was successful