PiAPI
HomeWorkspace
HomeWorkspace
Join Discord
  1. Byteaudio
  • Get Started
    • Overview
    • Quickstart
    • Make Instruction: How to Use PiAPI to Build a Workflow on Make?
  • Endpoints
    • Seedance
      • Less-Restriction Models Guide
      • Private Asset Library
      • Seedance 2
      • Video Watermark Remover
      • Get task
    • Seedream
      • Seedream 5 Lite
      • Get Task
    • Byteaudio
      • Seed-audio
        POST
      • Get Task
        GET
    • Kling
      • Lipsync With PiAPI Kling API Examples
      • Motion Brush With PiAPI Kling API Example
      • Kling Elements Video Generation API
      • Kling Effects Video Generation
      • Cancel Task
        • Cancel Task
        • Cancel Tasks
      • Get Task
      • Create Task
      • Kling Virtual Try-On
      • Kling Effects
      • Kling Sound
      • Kling Avatar
      • Kling Motion Control
      • Kling Turbo
      • Kling 3.0
    • Kling omni
      • Kling o1
      • Kling 3.0 omni
      • Get Task
    • Sora2
      • Sora2-preview Text to Video
      • Sora2 Text to Video
      • Sora2-Pro Text to Video
      • Sora2 Remove Watermark
      • Get task
    • Gemini
      • Gemini-2.5-flash-image
      • Nano Banana Pro
      • Nano Banana 2
      • Get task
    • GPT image
      • GPT-image API
    • LLM
      • How To Avoid Timeouts in Completion API
      • LLM API | Basic Completions
    • Omni Human
      • OmniHuman 1.5
      • Get task
    • Flux
      • Flux with LoRA and Controlnet
      • Available LoRA and Controlnet
      • Flux API with Redux Variation, Fill, Inpaint and Outpaint
      • Create Task
        • Text to Image
        • Image to Image
        • Kontext
      • Get task
    • Qwen Image
      • Text to Image
      • Image Edit
      • Get task
    • Z-Image
      • Text to Image
      • Get task
    • Faceswap
      • Multi Faceswap
      • Image Faceswap
      • Video Faceswap
      • Get Task
    • WanX
      • Generate WanX Task with LoRA Using PiAPI
      • Available LoRA Types for Wanx
      • Use Cases for Wanx LoRA
      • Use Cases for Wanx Control Camera
      • Create Task
      • Get Task
    • Wan
      • Wan2.6 Text to Video
      • Wan2.6 Image to Video
      • Get task
    • Hailuo
      • Generate Video
      • Get Task
    • Veo3
      • Veo3 Text to Video
      • Veo3 Image to Video
      • Veo3.1 Text to Video
      • Veo3.1 Image to Video
      • Get task
    • Skyreels
      • Create Task
      • Get Task
    • Framepack
      • Create Task
      • Get Task
    • Hunyuan Video
      • How to Make a Hunyuan API Call
      • Available Hunyuan Lora models
      • Get Task
      • Generate Video
    • Luma Dream Machine
      • Create Task
      • Get Task
    • Suno(service stopped)
      • Music(service stopped)
      • Lyrics(service stopped)
      • Get task
    • Song(Udio)
      • Song API Task Creation Examples
      • [Udio] Song Extend
      • Get Task
      • Create Task
      • [Udio] Generate Lyrics
    • Mmaudio
      • Get Task
      • Generate Audio
    • DiffRhythm
      • Generate Audio
      • Get Task
    • Ace Step
      • Create Task
        • Text to Audio
        • Audio to Audio
        • Audio Edit
        • Audio Extend
      • Get Task
    • TTS
      • Zeroshot Text-to-Speech F5-TTS
      • Get Task
    • Trellis
      • Trellis Create Task
      • Trellis2 Create Task
      • Get Task
    • Pixal3D
      • Pixal3D Create Task
      • Get Task
    • Joycaption
      • Image Caption
      • Get Task
    • Midjourney
      • PiAPI Penalties on Midjourney Usage
      • Detailed Explaination on Midjourney Task Result
      • Midjourney V7 API Instructions
      • Create Task
        • Imagine
        • Upscale
        • Variation
        • Reroll
        • Describe
        • Seed
        • Blend
        • Inpaint
        • Outpaint
        • Pan
      • Cancel Task
        • Cancel Task
        • Cancel Tasks
      • Get Task
    • AI Hug
      • Get Task
      • Create Task
    • Tools
      • File Upload API
      • Remove Background API
      • Remove Background-Get Task
      • Segment With Prompt API
      • Segment With Prompt API-Get Task
      • Image Upscale(Super Resolution) API
      • Image Upscale-Get Task
      • Video Upscale
      • Video Upscale-Get Task
      • Video Remove Background
      • Video Remove Background-Get task
    • PiAPI Account Management
      • PiAPI Account Info
      • Task List Info
      • User Task History
  • Resources
    • Change Log
    • Output Storage
    • Unified API Schema
    • Webhook
    • Bulk Generation Service
    • Billings
    • PiAPI MCP Server
    • Workspace Manual
      • Host-your-account (HYA) | Back-up Account
      • Host-your-account (HYA) | Debug Checklist
      • Host-your-account (HYA) | Connected Account Status
    • Announcements
      • PiAPI 2025 January 1st Pricing Update
      • The discontinued support for midjourney
      • Sunsetting Suno
  • Schemas
    • Schemas
      • motion brush
      • Create Task
      • camera control
      • Cancel Params
      • Float2 Point
      • Control Points
      • txt2video-1.3b
      • txt2video-14b
      • txt2video-14b-lora
      • img2video-14b
      • img2video-14b-lora
      • img2video-14b-keyframe
      • img2video-14b-control-camera
      • wan22-txt2video-14b
      • wan22-img2video-14b
      • hunyuan-txt2video-lora
      • Trellis API/text-to-3D
      • Trellis API/image-to-3D
      • Trellis2 API/image-to-3D
      • Kling omni multi shot
      • VideoGenerationRequest
      • TaskRequest
      • VideoGenerationResponse
      • TaskConfig
      • TaskInput
      • TaskResponse
      • ErrorResponse
    • Response
      • Unified-Task-Response
    • RequestBodies
      • Unified-Task-Request-Body
    • config
    • control_net_setting
    • lora_setting
    • Pixal3D API/image-to-3D
  1. Byteaudio

Seed-audio

POST
https://api.piapi.ai/api/v1/task

Overview#

Byteaudio generates natural-sounding speech from text using BytePlus' seed-audio-1.0 TTS engine. Requests are submitted to /api/v1/task and processed asynchronously — poll /api/v1/task/{task_id} until status becomes completed, then download the audio from the returned URL.
Typical end-to-end latency is 5–20 seconds depending on text length. Output is delivered as a downloadable audio file (default wav).

Currently available models#

ModelTask typeNotes
byteaudioseed-audio-1.0BytePlus Seed Audio 1.0 — text-to-speech with optional voice cloning from a reference sample

Pricing#

Billing is by output audio duration:
MetricRate
Output audio0.002/second(≈0.12 / minute)
Duration is rounded up to the nearest second and capped at 120 seconds per request (matching the upstream output ceiling).
Failed requests (validation error, upstream rejection, content moderation) refund frozen credits in full — you are only charged for successfully returned audio.
At submission time we freeze a conservative estimate based on your input length + requested speech_rate. On success, the difference between the estimate and the real duration is settled automatically (refund if over-estimated, additional charge if under-estimated).

Parameters#

text (required)#

The text to be synthesized. Up to 2048 characters (unicode-aware — punctuation, whitespace, emoji all count). Trimmed whitespace on both ends. Empty text is rejected.

format#

Output audio container / codec. Accepted values: wav (default), mp3, pcm, ogg_opus.

sample_rate#

Output audio sample rate in Hz. Accepted values: 8000, 16000, 24000 (default), 32000, 44100, 48000. Higher rates produce larger files without noticeable quality gain for speech.

speech_rate#

Integer speech speed offset. Range -50 to 100, default 0.
0 — normal speed (1.0×)
100 — 2.0× speed (shorter output)
-50 — 0.5× speed (longer output)
Values outside the range are silently clamped.

pitch_rate#

Integer pitch offset in semitones. Range -12 to 12, default 0. Values outside the range are silently clamped.

loudness_rate#

Integer loudness offset. Range -50 to 100, default 0.
0 — normal loudness
100 — approximately 2.0× loudness
-50 — approximately 0.5× loudness
Values outside the range are silently clamped.

references (optional)#

An array of reference resources for voice cloning or voice / style guidance. Each entry sets exactly one of the following fields — mixing fields in a single entry is rejected.

Audio references (up to 3 per request)#

FieldDescription
speakerPreset voice ID from the BytePlus Doubao / Seed Audio voice catalog
audio_dataBase64-encoded reference audio sample, up to 10 MB decoded (wav / mp3 / pcm / ogg_opus); optional data: URI prefix supported
audio_urlPublicly accessible HTTPS URL to a reference audio sample. ≤ 30 seconds, ≤ 10 MB
When supplying multiple audio references, use @Audio1, @Audio2, @Audio3 markers inside your text to switch between voices at word / sentence boundaries.

Image references (up to 1 per request)#

FieldDescription
image_dataBase64-encoded reference image, up to 10 MB decoded (jpeg / png / webp); optional data: URI prefix supported
image_urlPublicly accessible HTTPS URL to a reference image, ≤ 10 MB

Rules#

Audio and image references cannot be mixed in the same request.
Each reference entry must set exactly one of the five fields above (setting zero or two+ fields is rejected).
Inline audio_data / image_data must be under 10 MB after base64 decoding.

Content moderation#

BytePlus applies content moderation to both input text and the generated audio. Rejected submissions surface a clear error message from the upstream (for example: prohibited content, disallowed voice, invalid reference audio) and your frozen credits are refunded.
Common rejection reasons:
Sensitive / prohibited text content
Reference audio longer than the 30-second limit
Reference audio containing prohibited content
Requesting a preset voice you are not entitled to use

Response#

Byteaudio is asynchronous. The initial POST /api/v1/task returns immediately with status: pending. Poll GET /api/v1/task/{task_id} until status becomes completed or failed.
On success, output.audio_url points to a temporary, publicly downloadable URL hosted on our storage. Download the file promptly — the URL is intended for near-term retrieval, not long-term hosting.

Tips#

Prefer wav for downstream processing and mp3 for delivery to end users.
Keep text under a few hundred characters per request for lowest latency; longer input synthesizes at roughly 8× real-time.
For voice cloning, provide 5–10 seconds of clean reference audio via audio_url.
Use @AudioN markers in text when providing multiple audio references.

Request

Header Params

Body Params application/json

Examples
{
    "model": "byteaudio",
    "task_type": "seed-audio-1.0",
    "input": {
        "text": "Hello from PiAPI. This is a byteaudio text-to-speech smoke test."
    }
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://api.piapi.ai/api/v1/task' \
--header 'X-API-Key;' \
--header 'Content-Type: application/json' \
--data '{
    "model": "byteaudio",
    "task_type": "seed-audio-1.0",
    "input": {
        "text": "Hello from PiAPI. This is a byteaudio text-to-speech smoke test."
    }
}'

Responses

🟢200
application/json
Bodyapplication/json

Example
{
    "code": 200,
    "data": {
        "task_id": "c2eb9416-8ac5-4da8-a933-51626a699fc2",
        "model": "byteaudio",
        "task_type": "seed-audio-1.0",
        "status": "completed",
        "config": {
            "service_mode": "",
            "webhook_config": {
                "endpoint": "",
                "secret": ""
            }
        },
        "input": {
            "text": "Hello from PiAPI. This is a byteaudio text-to-speech smoke test.",
            "format": "mp3",
            "sample_rate": 24000
        },
        "output": {
            "audio_url": "https://img.theapi.app/temp/b04f4d2c-8e8e-4dc9-9fee-e408c38b9b1c.mp3",
            "duration": 5
        },
        "meta": {
            "created_at": "2026-07-08T02:53:43.256458815Z",
            "started_at": "2026-07-08T02:53:43.982496073Z",
            "ended_at": "2026-07-08T02:53:56.703711725Z",
            "usage": {
                "type": "point",
                "frozen": 0,
                "consume": 100000
            },
            "is_using_private_pool": false
        },
        "detail": null,
        "logs": [],
        "error": {
            "code": 0,
            "raw_message": "",
            "message": "",
            "detail": null
        }
    },
    "message": "success"
}
Modified at 2026-07-08 07:27:58
Previous
Get Task
Next
Get Task