import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/interviews/{interview_id}/translate/"
payload = { "language": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({language: '<string>'})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/interviews/{interview_id}/translate/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/interviews/{interview_id}/translate/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"language": "<string>"
}
'{
"language": "<string>",
"status": "running",
"translations": {},
"translated_count": 123,
"total_count": 123,
"error": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"language": "<string>",
"status": "running",
"translations": {},
"translated_count": 123,
"total_count": 123,
"error": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}{
"error": "Not found."
}Translate an interview transcript
Machine-translate the transcript’s message bubbles into a language, for
reviewers who do not read the interview’s language. Translations are cached
per language and reused; the call is idempotent: only messages not yet cached
in that language are translated (so re-posting on an in-progress interview
fills in the new turns) and a run already in flight is joined rather than
duplicated. Returns 202 while the translation is running and 200 once it is
complete; poll the translations endpoint for progress. Interview types
(interview, guided-interview, imported-interview) only. The translation
never appears in the interview payload itself — only the language codes of
complete translations do (available_translations).
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/interviews/{interview_id}/translate/"
payload = { "language": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({language: '<string>'})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/interviews/{interview_id}/translate/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/interviews/{interview_id}/translate/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"language": "<string>"
}
'{
"language": "<string>",
"status": "running",
"translations": {},
"translated_count": 123,
"total_count": 123,
"error": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"language": "<string>",
"status": "running",
"translations": {},
"translated_count": 123,
"total_count": 123,
"error": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}{
"error": "Not found."
}Authorizations
Use Authorization: Bearer <token>. The token is either a user token / OAuth access
token, or a service-account API key (cfk_...). A key is valid on every endpoint and
acts as its service account, an organization member with per-store permissions.
Refused keys answer 403 with Invalid API key., API key revoked.,
API key expired. or API key disabled..
Body
Response
Translation complete
Cached machine translation of an interview transcript into one language.
translations maps a message key to the translated text of that transcript
bubble.
The key is a 16-hex-character (zero-padded, lower-case) FNV-1a 64 hash over the
UTF-8 bytes of role + US + speaker + US + content, where US is the ASCII
unit separator (code point 31) and speaker is the empty string when absent.
Keys are computed from chat_history entries of type message with role
user or assistant, excluding panel-bound entries (to: "panel") and blank
content, so identical bubbles share one key and a cache survives an in-progress
interview growing. Bubbles without an entry are not translated yet.