AWS AI Services
AWS AI Services span both generative and traditional AI: Amazon Bedrock (foundation model hosting and inference), Comprehend (NLP), Rekognition (Vision), Polly (Text-to-Speech), Transcribe (Speech-to-Text), Translate (MT), and Lex (Conversational AI). This file uses Amazon Polly’s HTTP endpoint (/v1/speech) as a concrete example; see links for other services.
支持模型
API 接口列表
Amazon Polly Text-to-Speech endpoint. Submit JSON (Text/VoiceId/OutputFormat, etc.) to receive an audio byte stream. See SynthesizeSpeech docs.
{
"OutputFormat": "mp3",
"VoiceId": "Joanna",
"Text": "Hello from AWS Polly",
"Engine": "standard"
}Amazon Bedrock Runtime InvokeModel endpoint. Send a JSON inference request to a specific model and receive generated output (text, image, or embeddings). Parameters vary by model.
{
"modelId": "anthropic.claude-3-haiku-20240307-v1:0",
"contentType": "application/json",
"accept": "application/json",
"body": {
"prompt": "Write a haiku about AWS.",
"max_tokens_to_sample": 256
}
}Amazon Bedrock Runtime InvokeModelWithResponseStream (streaming) endpoint. For long text or incremental consumption use cases; returns a chunked event stream.
{
"modelId": "anthropic.claude-3-haiku-20240307-v1:0",
"contentType": "application/json",
"accept": "application/json",
"body": {
"prompt": "Explain Bedrock streaming in one paragraph.",
"max_tokens_to_sample": 512
}
}