Skip to main content
The DeepInfra Native API gives you access to every model we provide, including model types not covered by the OpenAI-compatible API: image generation, speech recognition, and zero-shot image classification. For LLMs and embeddings, the OpenAI-compatible API is simpler and recommended. Use the native API when you need model types beyond LLMs/embeddings, or when you need features like webhooks or log probabilities. The base endpoint is:

JavaScript client

Text Generation (LLMs)

This endpoint takes a raw prompt — it does not apply the model’s chat template. Pass pre-formatted text, or use the OpenAI-compatible chat API, which applies the template for you. Each model’s page lists its chat template.

Embeddings

Image Generation

Speech Recognition

Zero-Shot Image Classification

HTTP / other languages

The native API is plain HTTP — you can use it from any language (Go, C#, Java, PHP, Ruby, C++, etc.) without any SDK dependency.