Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.
get_api_artifactsOne API's artifacts, grouped by type.
get_openapiThe primary OpenAPI for this API.
find_similar_apisAPIs that look like this one.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools →
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/google-cloud-text-to-speech:google-cloud-text-to-speech-projects-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Cloud Text-to-Speech Projects API
version: v1
description: Generated from Google's published Discovery document for Cloud Text-to-Speech API (texttospeech v1, revision 20261110). 3 operation(s).
contact:
name: Google
url: https://developers.google.com/
termsOfService: https://developers.google.com/terms
servers:
- url: https://texttospeech.googleapis.com
tags:
- name: Projects
paths:
/v1/projects/{projectsId}/locations/{locationsId}:synthesizeLongAudio:
post:
operationId: texttospeech.projects.locations.synthesizeLongAudio
summary: Synthesize long audio locations
description: Synthesizes long form text asynchronously.
parameters:
- name: projectsId
in: path
required: true
description: Resource name segment (projectsId).
schema:
type: string
- name: locationsId
in: path
required: true
description: Resource name segment (locationsId).
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SynthesizeLongAudioRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/Operation'
4XX:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: Error response (google.rpc.Status)
security:
- oauth2:
- https://www.googleapis.com/auth/cloud-platform
- apiKey: []
tags:
- Projects
/v1/projects/{projectsId}/locations/{locationsId}/operations:
get:
operationId: texttospeech.projects.locations.operations.list
summary: List operations
description: Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
parameters:
- name: projectsId
in: path
required: true
description: Resource name segment (projectsId).
schema:
type: string
- name: locationsId
in: path
required: true
description: Resource name segment (locationsId).
schema:
type: string
- name: filter
in: query
required: false
description: The standard list filter.
schema:
type: string
- name: pageSize
in: query
required: false
description: The standard list page size.
schema:
type: integer
format: int32
- name: pageToken
in: query
required: false
description: The standard list page token.
schema:
type: string
- name: returnPartialSuccess
in: query
required: false
description: When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `"projects/example/locations/-"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation.
schema:
type: boolean
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/ListOperationsResponse'
4XX:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: Error response (google.rpc.Status)
security:
- oauth2:
- https://www.googleapis.com/auth/cloud-platform
- apiKey: []
tags:
- Projects
/v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:
get:
operationId: texttospeech.projects.locations.operations.get
summary: Get operations
description: Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
parameters:
- name: projectsId
in: path
required: true
description: Resource name segment (projectsId).
schema:
type: string
- name: locationsId
in: path
required: true
description: Resource name segment (locationsId).
schema:
type: string
- name: operationsId
in: path
required: true
description: Resource name segment (operationsId).
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/Operation'
4XX:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: Error response (google.rpc.Status)
security:
- oauth2:
- https://www.googleapis.com/auth/cloud-platform
- apiKey: []
tags:
- Projects
components:
schemas:
ListOperationsResponse:
type: object
description: The response message for Operations.ListOperations.
properties:
operations:
items:
$ref: '#/components/schemas/Operation'
type: array
description: A list of operations that matches the specified filter in the request.
unreachable:
description: Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations.
items:
type: string
type: array
nextPageToken:
description: The standard List next-page token.
type: string
CustomPronunciationParams:
properties:
phoneticEncoding:
description: The phonetic encoding of the phrase.
enum:
- PHONETIC_ENCODING_UNSPECIFIED
- PHONETIC_ENCODING_IPA
- PHONETIC_ENCODING_X_SAMPA
- PHONETIC_ENCODING_JAPANESE_YOMIGANA
- PHONETIC_ENCODING_PINYIN
type: string
pronunciation:
type: string
description: The pronunciation of the phrase. This must be in the phonetic encoding specified above.
phrase:
description: The phrase to which the customization is applied. The phrase can be multiple words, such as proper nouns, but shouldn't span the length of the sentence.
type: string
description: Pronunciation customization for a phrase.
type: object
GoogleRpcError:
type: object
description: The error envelope every Google API returns.
properties:
error:
type: object
properties:
code:
type: integer
message:
type: string
status:
type: string
details:
type: array
items:
type: object
Turn:
type: object
description: A multi-speaker turn.
properties:
text:
type: string
description: Required. The text to speak.
speaker:
type: string
description: Required. The speaker of the turn, for example, 'O' or 'Q'. Please refer to documentation for available speakers.
AudioConfig:
description: Description of audio data to be synthesized.
properties:
audioEncoding:
type: string
description: Required. The format of the audio byte stream.
enum:
- AUDIO_ENCODING_UNSPECIFIED
- LINEAR16
- MP3
- OGG_OPUS
- MULAW
- ALAW
- PCM
- M4A
volumeGainDb:
type: number
description: Optional. Input only. Volume gain (in dB) of the normal native volume supported by the specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) will play at approximately half the amplitude of the normal native signal amplitude. A value of +6.0 (dB) will play at approximately twice the amplitude of the normal native signal amplitude. Strongly recommend not to exceed +10 (dB) as there's usually no effective increase in loudness for any value greater than that.
format: double
effectsProfileId:
items:
type: string
type: array
description: Optional. Input only. An identifier which selects 'audio effects' profiles that are applied on (post synthesized) text to speech. Effects are applied on top of each other in the order they are given. See [audio profiles](https://cloud.google.com/text-to-speech/docs/audio-profiles) for current supported profile ids.
pitch:
format: double
description: Optional. Input only. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 semitones from the original pitch. -20 means decrease 20 semitones from the original pitch.
type: number
speakingRate:
description: Optional. Input only. Speaking rate/speed, in the range [0.25, 2.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any other values < 0.25 or > 2.0 will return an error.
type: number
format: double
sampleRateHertz:
description: Optional. The synthesis sample rate (in hertz) for this audio. When this is specified in SynthesizeSpeechRequest, if this is different from the voice's natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality), unless the specified sample rate is not supported for the encoding chosen, in which case it will fail the request and return google.rpc.Code.INVALID_ARGUMENT.
format: int32
type: integer
type: object
VoiceCloneParams:
type: object
properties:
voiceCloningKey:
description: Required. Created by GenerateVoiceCloningKey.
type: string
description: The configuration of Voice Clone feature.
MultispeakerPrebuiltVoice:
description: Configuration for a single speaker in a Gemini TTS multi-speaker setup. Enables dialogue between two speakers.
properties:
speakerId:
description: Required. The speaker ID of the voice. See https://cloud.google.com/text-to-speech/docs/gemini-tts#voice_options for available values.
type: string
speakerAlias:
description: Required. The speaker alias of the voice. This is the user-chosen speaker name that is used in the multispeaker text input, such as "Speaker1".
type: string
type: object
Operation:
properties:
error:
$ref: '#/components/schemas/Status'
description: The error result of the operation in case of failure or cancellation.
name:
description: The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
type: string
response:
type: object
description: The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
additionalProperties:
description: Properties of the object. Contains field @type with type URL.
metadata:
additionalProperties:
description: Properties of the object. Contains field @type with type URL.
type: object
description: Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
done:
description: If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
type: boolean
type: object
description: This resource represents a long-running operation that is the result of a network API call.
MultiSpeakerVoiceConfig:
properties:
speakerVoiceConfigs:
items:
$ref: '#/components/schemas/MultispeakerPrebuiltVoice'
description: Required. A list of configurations for the voices of the speakers. Exactly two speaker voice configurations must be provided.
type: array
type: object
description: Configuration for a multi-speaker text-to-speech setup. Enables the use of up to two distinct voices in a single synthesis request.
CustomVoiceParams:
properties:
reportedUsage:
enum:
- REPORTED_USAGE_UNSPECIFIED
- REALTIME
- OFFLINE
description: Optional. Deprecated. The usage of the synthesized audio to be reported.
type: string
deprecated: true
model:
type: string
description: Required. The name of the AutoML model that synthesizes the custom voice.
description: Description of the custom voice to be synthesized.
type: object
CustomPronunciations:
type: object
properties:
pronunciations:
description: The pronunciation customizations are applied.
items:
$ref: '#/components/schemas/CustomPronunciationParams'
type: array
description: A collection of pronunciation customizations.
SynthesizeLongAudioRequest:
description: The top-level message sent by the client for the `SynthesizeLongAudio` method.
properties:
audioConfig:
$ref: '#/components/schemas/AudioConfig'
description: Required. The configuration of the synthesized audio.
voice:
$ref: '#/components/schemas/VoiceSelectionParams'
description: Required. The desired voice of the synthesized audio.
outputGcsUri:
description: 'Required. Specifies a Cloud Storage URI for the synthesis results. Must be specified in the format: `gs://bucket_name/object_name`, and the bucket must already exist.'
type: string
input:
$ref: '#/components/schemas/SynthesisInput'
description: Required. The Synthesizer requires either plain text or SSML as input.
type: object
MultiSpeakerMarkup:
description: A collection of turns for multi-speaker synthesis.
type: object
properties:
turns:
description: Required. Speaker turns.
type: array
items:
$ref: '#/components/schemas/Turn'
VoiceSelectionParams:
type: object
description: Description of which voice to use for a synthesis request.
properties:
voiceClone:
$ref: '#/components/schemas/VoiceCloneParams'
description: Optional. The configuration for a voice clone. If [VoiceCloneParams.voice_clone_key] is set, the service chooses the voice clone matching the specified configuration.
modelName:
type: string
description: Optional. The name of the model. If set, the service will choose the model matching the specified configuration.
languageCode:
description: Required. The language (and potentially also the region) of the voice expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag, e.g. "en-US". This should not include a script tag (e.g. use "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred from the input provided in the SynthesisInput. The TTS service will use this parameter to help choose an appropriate voice. Note that the TTS service may choose a voice with a slightly different language code than the one selected; it may substitute a different region (e.g. using en-US rather than en-CA if there isn't a Canadian voice available), or even a different language, e.g. using "nb" (Norwegian Bokmal) instead of "no" (Norwegian)".
type: string
ssmlGender:
description: The preferred gender of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and name. Note that this is only a preference, not requirement; if a voice of the appropriate gender is not available, the synthesizer should substitute a voice with a different gender rather than failing the request.
enum:
- SSML_VOICE_GENDER_UNSPECIFIED
- MALE
- FEMALE
- NEUTRAL
type: string
name:
description: The name of the voice. If both the name and the gender are not set, the service will choose a voice based on the other parameters such as language_code.
type: string
multiSpeakerVoiceConfig:
$ref: '#/components/schemas/MultiSpeakerVoiceConfig'
description: Optional. The configuration for a Gemini multi-speaker text-to-speech setup. Enables the use of two distinct voices in a single synthesis request.
customVoice:
$ref: '#/components/schemas/CustomVoiceParams'
description: The configuration for a custom voice. If [CustomVoiceParams.model] is set, the service will choose the custom voice matching the specified configuration.
Status:
description: 'The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).'
properties:
message:
description: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
type: string
details:
type: array
description: A list of messages that carry the error details. There is a common set of message types for APIs to use.
items:
additionalProperties:
description: Properties of the object. Contains field @type with type URL.
type: object
code:
format: int32
type: integer
description: The status code, which should be an enum value of google.rpc.Code.
type: object
SynthesisInput:
description: Contains text input to be synthesized. Either `text` or `ssml` must be supplied. Supplying both or neither returns google.rpc.Code.INVALID_ARGUMENT. The input size is limited to 5000 bytes.
properties:
customPronunciations:
$ref: '#/components/schemas/CustomPronunciations'
description: Optional. The pronunciation customizations are applied to the input. If this is set, the input is synthesized using the given pronunciation customizations. The initial support is for en-us, with plans to expand to other locales in the future. Instant Clone voices aren't supported. In order to customize the pronunciation of a phrase, there must be an exact match of the phrase in the input types. If using SSML, the phrase must not be inside a phoneme tag.
ssml:
description: The SSML document to be synthesized. The SSML document must be valid and well-formed. Otherwise the RPC will fail and return google.rpc.Code.INVALID_ARGUMENT. For more information, see [SSML](https://cloud.google.com/text-to-speech/docs/ssml).
type: string
markup:
description: 'Markup for Chirp 3: HD voices specifically. This field may not be used with any other voices.'
type: string
text:
description: The raw text to be synthesized.
type: string
prompt:
description: This system instruction is supported only for controllable/promptable voice models. If this system instruction is used, we pass the unedited text to Gemini-TTS. Otherwise, a default system instruction is used. AI Studio calls this system instruction, Style Instructions.
type: string
multiSpeakerMarkup:
$ref: '#/components/schemas/MultiSpeakerMarkup'
description: The multi-speaker input to be synthesized. Only applicable for multi-speaker synthesis.
type: object
securitySchemes:
apiKey:
type: apiKey
in: query
name: key
description: API key; accepted by methods that do not need user data.
oauth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://accounts.google.com/o/oauth2/auth
tokenUrl: https://oauth2.googleapis.com/token
scopes:
https://www.googleapis.com/auth/cloud-platform: See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
externalDocs:
url: https://cloud.google.com/text-to-speech/
x-provenance:
method: harvested
publisher: Google
source: https://texttospeech.googleapis.com/$discovery/rest?version=v1
note: converted by discovery-to-openapi.py from Google's Discovery document (revision 20261110)