Text Generator Brain Text Generator

Text, Vision and Speech APIs in One Place

Text Generator > Blog > Text, Vision and Speech APIs in One Place

Text, Vision and Speech APIs in One Place

Many products need more than text. A support tool reads screenshots, a note app transcribes voice, a reading app speaks articles aloud. Text Generator exposes these as familiar OpenAI style endpoints, so one client and one key cover them.

Text: chat completions

Call /v1/chat/completions with streaming if you want tokens as they arrive. Use an auto profile or name a model directly.

from openai import OpenAI
            client = OpenAI(base_url="https://api.text-generator.io/v1", api_key=API_KEY)
            r = client.chat.completions.create(model="text-generator/auto", messages=[{"role": "user", "content": "Draft a friendly release note"}])

Vision: images in the message

Vision capable models accept images in the chat message. Use text-generator/auto-vision for OCR, screenshot questions, and image captioning. Send clear, well lit images and ask one specific question per request for the sharpest answers.

r = client.chat.completions.create(
                model="text-generator/auto-vision",
                messages=[{"role": "user", "content": [
                    {"type": "text", "text": "Read the total from this receipt"},
                    {"type": "image_url", "image_url": {"url": "https://example.com/receipt.jpg"}},
                ]}],
            )

Embeddings: search and clustering

/v1/embeddings turns text into vectors for semantic search, deduplication, and recommendations. Embed your documents once, store the vectors, and embed each query at request time.

Speech to text

/v1/audio/transcriptions converts recordings to text. Trim silence at the start of a file and prefer a clean mono recording for steady accuracy. Read more in our speech to text post.

Text to speech

/v1/audio/speech turns text into audio. The service catalogue lists App.nz TTS at $0.10 per audio minute and Pocket TTS at $0.06 per audio minute, with Pocket TTS offering 26 voices across six languages. Try voices in the browser at /text-to-speech.

Put them together

A voice assistant is three calls: transcribe the user audio, send the text to a chat model, then speak the reply. If you prefer a single request, see the multimodal audio API, which accepts audio and returns text plus speech.

Image generation too

The same key reaches /v1/images/generations, listed at $0.003 per image for fast SDXL. Try it at /tools/text-to-image.

Sign up, grab a key, and try each endpoint with one small request.

Get started free