Skip to main content
POST
Estimate the cost of an action

Authorizations

X-API-Key
string
header
required

Your Phrase Platform API token in the X-API-Key header. A missing, invalid or expired token is answered with 401. 403 means the token is valid but the action is not allowed for it.

Path Parameters

projectId
string<uuid>
required

Project ID.

recordingId
string<uuid>
required

Recording ID.

Body

application/json

The action to price.

action
enum<string>
required

translate is charged: every new language costs ceil(duration / 60) minutes. dubbing and transcribe cost 0: transcribe here means transcribing a recording that exists again (retranscription). The first transcription of a file is charged when you add the recording with POST /v1/projects/{projectId}/recordings, and cannot be estimated beforehand.

Available options:
translate,
dubbing,
transcribe
languages
string[]

Target languages of translate or dubbing. Not needed for transcribe.

Response

The estimate

The price of an action, worked out without starting it.

action
enum<string>
required

The action that was priced.

Available options:
translate,
dubbing,
transcribe
unit
enum<string>
required

Always minutes.

Available options:
minutes
minutes
integer
required

Total minutes the action would use.

perLanguage
object[]
required

Cost of each language.

balance
object
required

Credits your organization has left. Credits are minutes of media.

enoughCredits
boolean | null
required

Whether the balance covers minutes. null when the balance is unknown.

allowed
boolean
required

false when your organization is blocked (balance.state is BLOCKED): then transcription, translation, dubbing, sync-dubbing, re-dubbing and speech are refused with 403, whatever they cost. true otherwise.