# Google Text-to-Speech Integration via LowCodeAPI

**Last Updated**: February 10, 2026

## Overview
Cloud Text-to-Speech API for converting text to natural-sounding speech

**Categories:**
- {'id': 'google-ai', 'name': 'Google'}

## Base Endpoint
https://api.lowcodeapi.com/googletexttospeech

**Important**: Always include the provider name in the URL path after `api.lowcodeapi.com/`

## Authentication
**Type:** API_KEY

**Official Documentation:** https://cloud.google.com/text-to-speech/docs/reference/rest

## URL Format (Important)

LowCodeAPI supports two URL formats. **Always try the New Format first**, then fall back to Old Format if needed.

### New Format (Priority)
- Path parameters stay in the URL path
- Do NOT include path parameters as query parameters
- Example: `https://api.lowcodeapi.com/{provider}/resource/{id}?api_token=XXX`

### Old Format (Fallback)
- Path parameters become query parameters
- Example: `https://api.lowcodeapi.com/{provider}/resource/id?id={id}&api_token=XXX`

### Decision Flow for AI Agents
1. Always use **New Format** first - keep path parameters in the URL path
2. If you get a 404 or error, try **Old Format** with sanitized path
3. Log which format worked for future requests to this provider

## API Categories

## Common Endpoints

### Synthesize speech

**Method:** POST
**LowCodeAPI Path:** /v1/text:synthesize

**New Format URL:**
https://api.lowcodeapi.com/googletexttospeech/v1/text:synthesize?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/googletexttospeech/v1/text:synthesize?api_token=YOUR_API_TOKEN

**Request Body:**

| Field | Type | Description |
|-------|------|-------------|
| audioConfig | object |  |
| input | object |  |
| voice | object |  |

**Example Request (New Format):**

```bash
curl -X POST 'https://api.lowcodeapi.com/googletexttospeech/v1/text:synthesize?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://cloud.google.com/text-to-speech/docs/reference/rest/v1/text/synthesize

### List voices

**Method:** GET
**LowCodeAPI Path:** /v1/voices

**New Format URL:**
https://api.lowcodeapi.com/googletexttospeech/v1/voices?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/googletexttospeech/v1/voices?api_token=YOUR_API_TOKEN

**Query Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| languageCode | string |  |

**Example Request (New Format):**

```bash
curl -X GET 'https://api.lowcodeapi.com/googletexttospeech/v1/voices?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://cloud.google.com/text-to-speech/docs/reference/rest/v1/voices/list

### List custom voices

**Method:** GET
**LowCodeAPI Path:** /v1/projects/{project_id}/locations/{location_id}/voices

**New Format URL:**
https://api.lowcodeapi.com/googletexttospeech/v1/projects/{project_id}/locations/{location_id}/voices?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/googletexttospeech/v1/projects/project_id/locations/location_id/voices?location_id={location_id}&project_id={project_id}&api_token=YOUR_API_TOKEN

**Path Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| location_id | string |  |
| project_id | string |  |

**Query Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| pageSize | number |  |
| pageToken | string |  |

**Example Request (New Format):**

```bash
curl -X GET 'https://api.lowcodeapi.com/googletexttospeech/v1/projects/{project_id}/locations/{location_id}/voices?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://cloud.google.com/text-to-speech/docs/reference/rest/v1/projects.locations.voices/list

### Create custom voice

**Method:** POST
**LowCodeAPI Path:** /v1/projects/{project_id}/locations/{location_id}/voices

**New Format URL:**
https://api.lowcodeapi.com/googletexttospeech/v1/projects/{project_id}/locations/{location_id}/voices?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/googletexttospeech/v1/projects/project_id/locations/location_id/voices?location_id={location_id}&project_id={project_id}&api_token=YOUR_API_TOKEN

**Path Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| location_id | string |  |
| project_id | string |  |

**Request Body:**

| Field | Type | Description |
|-------|------|-------------|
| sourceData | object |  |
| voiceId | string |  |

**Example Request (New Format):**

```bash
curl -X POST 'https://api.lowcodeapi.com/googletexttospeech/v1/projects/{project_id}/locations/{location_id}/voices?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://cloud.google.com/text-to-speech/docs/reference/rest/v1/projects.locations.voices/create

### Get custom voice

**Method:** GET
**LowCodeAPI Path:** /v1/projects/{project_id}/locations/{location_id}/voices/{voice_id}

**New Format URL:**
https://api.lowcodeapi.com/googletexttospeech/v1/projects/{project_id}/locations/{location_id}/voices/{voice_id}?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/googletexttospeech/v1/projects/project_id/locations/location_id/voices/voice_id?location_id={location_id}&project_id={project_id}&voice_id={voice_id}&api_token=YOUR_API_TOKEN

**Path Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| location_id | string |  |
| project_id | string |  |
| voice_id | string |  |

**Example Request (New Format):**

```bash
curl -X GET 'https://api.lowcodeapi.com/googletexttospeech/v1/projects/{project_id}/locations/{location_id}/voices/{voice_id}?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://cloud.google.com/text-to-speech/docs/reference/rest/v1/projects.locations.voices/get

### Delete custom voice

**Method:** DELETE
**LowCodeAPI Path:** /v1/projects/{project_id}/locations/{location_id}/voices/{voice_id}

**New Format URL:**
https://api.lowcodeapi.com/googletexttospeech/v1/projects/{project_id}/locations/{location_id}/voices/{voice_id}?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/googletexttospeech/v1/projects/project_id/locations/location_id/voices/voice_id?location_id={location_id}&project_id={project_id}&voice_id={voice_id}&api_token=YOUR_API_TOKEN

**Path Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| location_id | string |  |
| project_id | string |  |
| voice_id | string |  |

**Example Request (New Format):**

```bash
curl -X DELETE 'https://api.lowcodeapi.com/googletexttospeech/v1/projects/{project_id}/locations/{location_id}/voices/{voice_id}?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://cloud.google.com/text-to-speech/docs/reference/rest/v1/projects.locations.voices/delete


## Usage Examples

### Example 1: Basic API Request (New Format)

Making a simple GET request to retrieve resources:

```bash
# Get a list of resources - no path parameters needed
curl -X GET "https://api.lowcodeapi.com/googletexttospeech/endpoint?api_token=YOUR_API_TOKEN"
```

### Example 2: Request with Path Parameters (New Format)

Retrieving a specific resource using its ID:

```bash
# Get specific resource by ID - replace RESOURCE_ID with actual ID from previous response
curl -X GET "https://api.lowcodeapi.com/googletexttospeech/endpoint/{RESOURCE_ID}?api_token=YOUR_API_TOKEN"
# Note: RESOURCE_ID typically comes from a previous list request or from the provider dashboard
```

### Example 3: POST Request with Body (New Format)

Creating a new resource:

```bash
# Create a new resource
curl -X POST "https://api.lowcodeapi.com/googletexttospeech/endpoint?api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"field": "value", "another_field": "another_value"}'
```

## Error Handling

LowCodeAPI returns standard HTTP status codes. Common errors:

| Status Code | Description |
|-------------|-------------|
| 200 | Success - Request completed successfully |
| 400 | Bad Request - Invalid parameters or request body |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Endpoint or resource doesn't exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Server Error - Provider API error |

All error responses include error details:

```json
{
  "data": {
    "error": {
      "message": "Error description",
      "code": "ERROR_CODE"
    }
  }
}
```

## Complete Endpoint Reference

| Endpoint | Method | Category |
|----------|--------|----------|
| Synthesize speech | POST | Regular API |
| List voices | GET | Regular API |
| List custom voices | GET | Custom Voices |
| Create custom voice | POST | Custom Voices |
| Get custom voice | GET | Custom Voices |
| Delete custom voice | DELETE | Custom Voices |

## API Definition Endpoints

You can fetch the complete API specification for this provider:

**New Format (OpenAPI spec):**
```bash
curl 'https://backend.lowcodeapi.com/googletexttospeech/openapi'
```

**Old Format (API definition):**
```bash
curl 'https://backend.lowcodeapi.com/googletexttospeech/definition'
```

## Response Format

All responses are wrapped in a `data` key:

```json
{
  "data": {
    // Actual response from provider (object or array)
  }
}
```