Dataset
Add translated rows to a dataset
Changed onTranslates a sample of this dataset’s rows into each target language and returns the result as a new dataset, leaving this one unchanged. The new dataset carries this dataset’s rows alongside the translated ones, so it can be trained on or downloaded directly. Poll GET /datasets/{dataset_id}/status on the returned id until it reaches succeeded. To adapt rows to a country as well as a language, use POST /datasets/{dataset_id}/localize. Set estimate=true to price the request without starting a run.
post/api/v1/datasets/{dataset_id}/translate
Request
- The document declares no server URL.
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
dataset_idstring required
Request body
Example request
{
"sample_rate": 0.25,
"languages": [
"es",
"fr"
]
}Response
Example response
{
"dataset_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "running",
"estimated_credits_consumed": 5,
"estimated_new_rows": 500
}Changes
- breaking
the
request property's minItems was increased to1
- breaking