new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

AI SDK · Providers · all subjects

aihubmix/capabilities

10 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Aihubmix chat completion example

Example using Aihubmix for chat completion with o4-mini model: import { aihubmix } from '@aihubmix/ai-sdk-provider'; import { generateText } from 'ai'; const { text } = await generateText({ model: aihubmix('o4-mini'), prompt: 'Write a vegetarian lasagna recipe for 4 people.', });

Aihubmix Claude model example

Example using Aihubmix with Claude model: import { aihubmix } from '@aihubmix/ai-sdk-provider'; import { generateText } from 'ai'; const { text } = await generateText({ model: aihubmix('claude-sonnet-4-5-20250929'), prompt: 'Explain quantum computing in simple terms.', });

Aihubmix Gemini model example

Example using Aihubmix with Gemini model: import { aihubmix } from '@aihubmix/ai-sdk-provider'; import { generateText } from 'ai'; const { text } = await generateText({ model: aihubmix('gemini-2.5-flash'), prompt: 'Create a Python script to sort a list of numbers.', });

Aihubmix image generation capability

Aihubmix supports image generation using aihubmix.image() method. Example: import { aihubmix } from '@aihubmix/ai-sdk-provider'; import { generateImage } from 'ai'; const { image } = await generateImage({ model: aihubmix.image('gpt-image-1'), prompt: 'A beautiful sunset over mountains', });

Aihubmix embeddings capability

Aihubmix supports embeddings using aihubmix.embedding() method. Example: import { aihubmix } from '@aihubmix/ai-sdk-provider'; import { embed } from 'ai'; const { embedding } = await embed({ model: aihubmix.embedding('text-embedding-ada-002'), value: 'Hello, world!', });

Aihubmix transcription capability

Aihubmix supports transcription using aihubmix.transcription() method. Example: import { aihubmix } from '@aihubmix/ai-sdk-provider'; import { transcribe } from 'ai'; const { text } = await transcribe({ model: aihubmix.transcription('whisper-1'), audio: audioFile, });

Aihubmix stream text example

Example of streaming text with Aihubmix: import { aihubmix } from '@aihubmix/ai-sdk-provider'; import { streamText } from 'ai'; const result = streamText({ model: aihubmix('gpt-3.5-turbo'), prompt: 'Write a short story about a robot learning to paint.', maxOutputTokens: 256, temperature: 0.3, maxRetries: 3, }); let fullText = ''; for await (const textPart of result.textStream) { fullText += textPart; process.stdout.write(textPart); } console.log('\nUsage:', await result.usage); console.log('Finish reason:', await result.finishReason);

Aihubmix streaming structured output example

Example of streaming structured output with Aihubmix: import { aihubmix } from '@aihubmix/ai-sdk-provider'; import { streamText, Output } from 'ai'; import { z } from 'zod'; const result = streamText({ model: aihubmix('gpt-4o-mini'), output: Output.object({ schema: z.object({ recipe: z.object({ name: z.string(), ingredients: z.array(z.object({ name: z.string(), amount: z.string() })), steps: z.array(z.string()) }) }) }), prompt: 'Generate a lasagna recipe.' }); for await (const objectPart of result.partialOutputStream) { console.log(objectPart); } console.log('Token usage:', await result.usage); console.log('Final object:', await result.output);

Aihubmix embed many example

Example of embedding multiple values with Aihubmix: import { aihubmix } from '@aihubmix/ai-sdk-provider'; import { embedMany } from 'ai'; const { embeddings, usage } = await embedMany({ model: aihubmix.embedding('text-embedding-3-small'), values: ['sunny day at the beach', 'rainy afternoon in the city', 'snowy night in the mountains'] }); console.log('Embeddings:', embeddings); console.log('Usage:', usage);

Aihubmix speech synthesis capability

Aihubmix supports speech synthesis using aihubmix.speech() method. Example: import { aihubmix } from '@aihubmix/ai-sdk-provider'; import { generateSpeech } from 'ai'; const { audio } = await generateSpeech({ model: aihubmix.speech('tts-1'), text: 'Hello, this is a test for speech synthesis.' });

Give your agent this brain