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

deepinfra/models

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

DeepInfra language model usage example

Example code showing how to use DeepInfra language models with generateText: ```ts import { deepInfra } from '@ai-sdk/deepinfra'; import { generateText } from 'ai'; const { text } = await generateText({ model: deepInfra('meta-llama/Meta-Llama-3.1-70B-Instruct'), prompt: 'Write a vegetarian lasagna recipe for 4 people.', }); ```

DeepInfra language model capabilities table

Supported language models and their capabilities: | Model | Image Input | Object Generation | Tool Usage | Tool Streaming | |-------|-------------|-------------------|------------|----------------| | meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8 | Yes | No | No | No | | meta-llama/Llama-4-Scout-17B-16E-Instruct | Yes | No | No | No | | meta-llama/Llama-3.3-70B-Instruct-Turbo | No | Yes | Yes | Yes | | meta-llama/Llama-3.3-70B-Instruct | No | Yes | Yes | Yes | | meta-llama/Meta-Llama-3.1-405B-Instruct | No | Yes | Yes | Yes | | meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo | No | Yes | Yes | Yes | | meta-llama/Meta-Llama-3.1-70B-Instruct | No | Yes | Yes | Yes | | meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo | No | Yes | Yes | No | | meta-llama/Meta-Llama-3.1-8B-Instruct | No | Yes | Yes | Yes | | meta-llama/Llama-3.2-11B-Vision-Instruct | Yes | Yes | No | No | | meta-llama/Llama-3.2-90B-Vision-Instruct | Yes | Yes | No | No | | mistralai/Mixtral-8x7B-Instruct-v0.1 | No | Yes | Yes | No | | deepseek-ai/DeepSeek-V3 | No | Yes | Yes | Yes | | deepseek-ai/DeepSeek-R1 | No | No | No | No | | deepseek-ai/DeepSeek-R1-Distill-Llama-70B | No | No | No | No | | deepseek-ai/DeepSeek-R1-Turbo | No | No | No | No | | nvidia/Llama-3.1-Nemotron-70B-Instruct | No | Yes | Yes | No | | Qwen/Qwen2-7B-Instruct | No | Yes | No | No | | Qwen/Qwen2.5-72B-Instruct | No | Yes | Yes | Yes | | Qwen/Qwen2.5-Coder-32B-Instruct | No | Yes | No | No | | Qwen/QwQ-32B-Preview | No | Yes | No | No | | google/codegemma-7b-it | No | No | No | No | | google/gemma-2-9b-it | No | No | No | No | | microsoft/WizardLM-2-8x22B | No | No | No | No |

DeepInfra image model generation with generateImage

DeepInfra image models can be created using the .image() factory method and used with the generateImage() function. Example code: ```ts import { deepInfra, type DeepInfraImageModelOptions } from '@ai-sdk/deepinfra'; import { generateImage } from 'ai'; const { image } = await generateImage({ model: deepInfra.image('stabilityai/sd3.5'), prompt: 'A futuristic cityscape at sunset', aspectRatio: '16:9', }); ```

DeepInfra image editing basic example

Transform an existing image using text prompts with image editing model: ```ts const imageBuffer = readFileSync('./input-image.png'); const { images } = await generateImage({ model: deepInfra.image('Qwen/Qwen-Image-Edit'), prompt: { text: 'Turn the cat into a golden retriever dog', images: [imageBuffer], }, size: '1024x1024', }); ```

DeepInfra image inpainting with mask example

Edit specific parts of an image using a mask, where transparent areas indicate where the image should be edited: ```ts const image = readFileSync('./input-image.png'); const mask = readFileSync('./mask.png'); const { images } = await generateImage({ model: deepInfra.image('Qwen/Qwen-Image-Edit'), prompt: { text: 'A sunlit indoor lounge area with a pool containing a flamingo', images: [image], mask: mask, }, }); ```

DeepInfra multi-image combining example

Combine multiple reference images into a single output: ```ts const cat = readFileSync('./cat.png'); const dog = readFileSync('./dog.png'); const { images } = await generateImage({ model: deepInfra.image('Qwen/Qwen-Image-Edit'), prompt: { text: 'Create a scene with both animals together, playing as friends', images: [cat, dog], }, }); ```

DeepInfra image model capabilities and dimensions

Image model capabilities and dimension specifications: | Model | Dimensions Specification | Notes | |-------|--------------------------|-------| | stabilityai/sd3.5 | Aspect Ratio | Premium quality base model, 8B parameters | | black-forest-labs/FLUX-1.1-pro | Size | Latest state-of-art model with superior prompt following | | black-forest-labs/FLUX-1-schnell | Size | Fast generation in 1-4 steps | | black-forest-labs/FLUX-1-dev | Size | Optimized for anatomical accuracy | | black-forest-labs/FLUX-pro | Size | Flagship Flux model | | black-forest-labs/FLUX.1-Kontext-dev | Size | Image editing and transformation model | | black-forest-labs/FLUX.1-Kontext-pro | Size | Professional image editing and transformation | | stabilityai/sd3.5-medium | Aspect Ratio | Balanced 2.5B parameter model | | stabilityai/sdxl-turbo | Aspect Ratio | Optimized for fast generation | For models supporting aspect ratios, the following ratios are typically supported: 1:1 (default), 16:9, 1:9, 3:2, 2:3, 4:5, 5:4, 9:16, 9:21. For models supporting size parameters, dimensions must typically be multiples of 32, with width and height between 256 and 1440 pixels, and default size is 1024x1024.

DeepInfra embedding model usage

DeepInfra embedding models can be created using the .embeddingModel() factory method and used with the embed() function. Example code: ```ts import { deepInfra } from '@ai-sdk/deepinfra'; import { embed } from 'ai'; const { embedding } = await embed({ model: deepInfra.embeddingModel('BAAI/bge-large-en-v1.5'), value: 'sunny day at the beach', }); ```

DeepInfra embedding model capabilities

Embedding model capabilities with dimensions and max tokens: | Model | Dimensions | Max Tokens | |-------|------------|------------| | BAAI/bge-base-en-v1.5 | 768 | 512 | | BAAI/bge-large-en-v1.5 | 1024 | 512 | | BAAI/bge-m3 | 1024 | 8192 | | intfloat/e5-base-v2 | 768 | 512 | | intfloat/e5-large-v2 | 1024 | 512 | | intfloat/multilingual-e5-large | 1024 | 512 | | sentence-transformers/all-MiniLM-L12-v2 | 384 | 256 | | sentence-transformers/all-MiniLM-L6-v2 | 384 | 256 | | sentence-transformers/all-mpnet-base-v2 | 768 | 384 | | sentence-transformers/clip-ViT-B-32 | 512 | 77 | | sentence-transformers/clip-ViT-B-32-multilingual-v1 | 512 | 77 | | sentence-transformers/multi-qa-mpnet-base-dot-v1 | 768 | 512 | | sentence-transformers/paraphrase-MiniLM-L6-v2 | 384 | 128 | | shibing624/text2vec-base-chinese | 768 | 512 | | thenlper/gte-base | 768 | 512 | | thenlper/gte-large | 1024 | 512 |

Give your agent this brain