One API Key for Text, Image, Video, Audio & Embeddings
One base URL and one key for chat, image generation and editing, video, TTS, STT and embeddings. Endpoints, models, billing and limits per modality.
In Brief
- One base URL and one API key cover seven capabilities: text chat, image generation, image editing, video generation, text-to-speech (TTS), speech-to-text (STT), and embeddings.
- Text uses
/chat/completions(it also supports the Anthropic-style/messagesand OpenAI/responses). The other modalities each have dedicated OpenAI-compatible endpoints. - The model lineup spans providers. Video includes Sora 2 Pro, Veo 3.1, Seedance 2.0 and the Wan series; images include GPT-5.4 Image, Gemini Image and Qwen-Image; TTS features qwen3-tts-flash.
- Billing units differ by modality (tokens / images / seconds of delivered video / characters), but all are charged from the same balance, on the same bill, and can be issued as a uniform invoice.
- The honest limits table is at the end. Know the boundaries before you start integrating.
Why "One Key" Matters
The default path looks like this: one provider for text, another for images, another for video, and yet another for embeddings. That means four SDKs, four authentication methods, and four overseas bills, before you've even started writing the actual features. Each new modality reruns the procurement and expense-claim process.
With everything behind one endpoint, you get one base URL, one key, one bill (a uniform invoice, supporting personal or company tax IDs), and one /logs page showing all your usage. When a new model launches, you can use it by changing a single model string.
Which Endpoint Each Modality Uses
| Modality | Endpoint | How to call |
|---|---|---|
| Text chat | POST /api/v1/chat/completions | Supported natively by the OpenAI SDK |
| Text (Anthropic style) | POST /api/v1/messages | Claude SDK migration requires no code changes |
| Text (Responses API) | POST /api/v1/responses | OpenAI's newer interface |
| Image generation | POST /api/v1/images/generations | Text-to-image |
| Image editing | POST /api/v1/images/edits | Image-to-image, instruction-based editing |
| Video generation | POST /api/v1/videos → poll → download | Asynchronous task |
| Text-to-speech (TTS) | POST /api/v1/audio/speech | Returns an audio stream |
| Speech-to-text (STT) | POST /api/v1/audio/transcriptions | multipart upload or base64 JSON |
| Embedding | POST /api/v1/embeddings | Supported natively by the OpenAI SDK |
Which Models Are Available for Each Modality
Image generation / editing: gpt-5.4-image-2, the Gemini 3.x Image series, qwen/qwen-image-max, qwen/qwen-image-edit-max, the Wan 2.x text-to-image series, and alibaba/z-image-turbo.
Video generation: openai/sora-2-pro, google/veo-3.1, bytedance/seedance-2.0 (including the fast version), and the full Wan 2.x text-to-video and image-to-video family. For first-and-last-frame and reference-image workflows, see the image-to-video tutorial. For a comparison of video generation tools by provider, see AI video generation tools comparison 2026.
Audio: TTS features qwen/qwen3-tts-flash (multiple voices, strong Chinese performance); STT supports mainstream transcription models.
Embedding: text-embedding-3-small / text-embedding-3-large, qwen3-embedding-4b / 8b, gemini-embedding-001, and others.
For the full list and live unit prices, see BazaarLink Models.
How Billing Differs Across Modalities
Each modality has its own natural billing unit, and BazaarLink follows the industry convention for each one:
| Modality | Billing unit | Notes |
|---|---|---|
| Text | input / output tokens | Same per-MTok structure as each provider's official pricing |
| Images | per image or per token, depending on the model | Prices are listed on each model page under /models |
| Video | seconds of delivered video | Billed only on the length of the final output video |
| TTS | input characters | Text length determines the cost, which makes budgeting easy |
| STT | based on audio duration / usage | Settled based on usage reported by the upstream provider |
| Embedding | input tokens | No output charge |
All modalities are charged from the same prepaid balance, so you don't need to top up separately.
Honest Limits Table
Know the boundaries first so you don't run into problems during integration:
| Limit | Details |
|---|---|
| Image editing does not support masks | /v1/images/edits performs whole-image instruction-based editing, with no local mask-based repair |
| Image editing returns mainly URLs | The b64_json response format is not supported |
| Video generation is asynchronous | Create task → poll status → download; you cannot wait for the result synchronously |
| Embeddings do not stream | One request, one response (this is standard across the industry) |
| TTS has no upstream usage envelope | Billed by input characters, settled on the platform side |
| Model capabilities vary | For example, some video models only support text-to-video and not image-to-video; see each model page |
Getting Started with One Call
Text (only two strings need to change to run it):
from openai import OpenAI
client = OpenAI(base_url="https://bazaarlink.ai/api/v1", api_key="sk-bl-...")
resp = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role": "user", "content": "Hello"}],
)
Image generation:
img = client.images.generate(
model="qwen/qwen-image-max",
prompt="a watercolor painting of Taipei 101 at dusk",
)
print(img.data[0].url)
Embedding:
emb = client.embeddings.create(
model="text-embedding-3-small",
input="How do I check uniform invoice winning numbers?",
)
print(len(emb.data[0].embedding))
TTS (returns binary audio):
curl https://bazaarlink.ai/api/v1/audio/speech \
-H "Authorization: Bearer $BAZAARLINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "qwen/qwen3-tts-flash", "input": "Welcome to BazaarLink", "voice": "Cherry"}' \
-o hello.mp3
Sign up for free (no credit card required) to get started. To compare the TWD costs of text models across providers, see the pricing series: Claude, GPT-5, Gemini, and DeepSeek.
FAQ
Can one API key really call every modality?
Yes. The same key, which starts with sk-bl-, works for the text, image, video, speech and embedding endpoints. The credit balance is shared, and usage appears on one bill and in /logs.
Why doesn't video generation return a result right away?
Video generation is an asynchronous task. You POST to /v1/videos, receive an id, poll the status until it completes, and then download the result. Generation usually takes tens of seconds to several minutes, and a synchronous wait would be cut off by upstream HTTP timeouts, which is why all mainstream video APIs are asynchronous.
What are the limits of image editing?
/v1/images/edits supports editing an input image with a text instruction (image-to-image), but it does not currently support mask-based local editing, and the response is mainly a URL (b64_json is not supported). Keep this in mind if your workflow needs precise local repairs.
How is text-to-speech billed?
TTS (/v1/audio/speech) is billed by the number of input characters, not by tokens. This makes it easy to budget: the cost depends on how long your text is, not on speaking speed or audio length.
Which models can I use for embeddings?
These include the OpenAI text-embedding-3 series, Qwen3-embedding (4B/8B), Gemini embedding and others. For choosing a model for a RAG knowledge base and how to attribute costs, see the article on introducing AI into enterprise knowledge management.
Why integrate on one platform instead of opening separate accounts with each provider?
The hidden costs of separate integrations are one SDK per provider, one authentication method each, and one overseas bill each. With integration you get one base URL, one key, and one bill that can be issued as a uniform invoice. When a new modality launches, you also don't have to repeat the procurement and integration process.
TWD billing · Taiwan invoices · leading AI models · OpenAI-compatible API