Standardized Inputs for AI Models

Bytez simplifies building with 40k+ Open Source and Closed Source AI models by standardizing inputs across 33 ML tasks. This consistency eliminates the need to adjust for varying input structures, allowing seamless integration for text, messages, image, or multiple inputs.

Why Standardization?

  • Reduces integration complexity.
  • Enables task/provider switching without reformatting inputs.

Input Schemas

Text

For models that process text:

json
{
  "text": "Input text",
  "stream": false,
  "params": { "max_length": 100, "temperature": 0.7 }
}

Tasks: Fill Mask, Summarization, Text-to-Speech, Translation, Text Generation, etc.

Messages

For chat and multi-modal tasks:

json
{
  "messages": [
    { "role": "system", "content": "You are a helpful assistant." },
    { "role": "user", "content": "What's the weather like today?" }
  ]
}

Tasks: Chat.

Image

For image processing, use either:

URL:

json
{ "image_url": "https://example.com/image.jpg" }

Base64:

json
{ "base64": "data:image/webp;base64,..." }

Tasks: Image Classification, Object Detection, Image-to-Text.

Multi-Input

For models needing both text and image or audio or video:

json
{
  "text": "What's in the image?",
  "image_url": "https://example.com/image.jpg"
}

Tasks: Visual Question Answering, Zero-Shot Classification, etc.

This unified schema accelerates development and ensures compatibility across diverse AI tasks.