Skip to content

Models and calling methods

View as Markdown

Every model in the GenAI API catalog belongs to one task category: Text-to-Text, Image-to-Text, Image-to-Image, Object Detection, Speech-to-Text, Text-to-Image, Text-to-Speech, Multimodal, Text Embedding, or Rerank. How you call a model from your own code depends on the shape of its endpoint rather than its category. Every model is served from the same host, infer.e2enetworks.net, whether your project is in Delhi or Chennai.

A text or embedding model’s endpoint carries the model’s own name: https://infer.e2enetworks.net/project/<project-id>/genai/<model-name>/v1. Speech, image, and translation models share one endpoint, https://infer.e2enetworks.net/project/<project-id>/genai/v1, and the model’s name goes in the request body instead.

Yes, a text or embedding model No, a speech, image, or translation model Yes No Pick the model you want to call Does its endpoint carry the model's name? Call it with the OpenAI SDK or REST Is it one of the eight models the TIR SDK knows? Call it with the TIR SDK or REST Call it with REST
Diagram as text
flowchart TD
    A[Pick the model you want to call] --> B{Does its endpoint carry the model's name?}
    B -->|Yes, a text or embedding model| C[Call it with the OpenAI SDK or REST]
    B -->|No, a speech, image, or translation model| D{Is it one of the eight models the TIR SDK knows?}
    D -->|Yes| E[Call it with the TIR SDK or REST]
    D -->|No| F[Call it with REST]

Call a text or embedding model with the OpenAI SDK pointed at its endpoint, or with a plain REST call. For a speech, image, or translation model, the TIR SDK puts the model name into the request body for you, for the eight models it knows by name. Call any other model with REST. It works for every model, because both SDKs make the same HTTP call underneath.

For the full call, see Call the API with the OpenAI SDK, Call the API with the TIR SDK, and Call the API with REST. To create your Auth Token, see Get started with TIR GenAI API.

A model’s name in code can differ from its display name

Section titled “A model’s name in code can differ from its display name”

The name you pass to the REST API or the OpenAI SDK sometimes differs from the name shown in the model list:

Display name in the model list Name you pass in code
e5-mistral-7b-instruct e5_mistral_7b_instruct
Whisper Large V3 whisper-large-v3

Copy the name from the model’s own Get Code section instead of typing the display name. The TIR SDK accepts its own fixed list of names, such as e5-mistral-7b-instruct with hyphens; see Call the API with the TIR SDK.

Which models are available changes over time; the FAQ explains what that means for code you have written. To check a model before you build on it, try it in the Playground; see Use the Playground.