Models
List and retrieve information about available models. Use these endpoints to discover which models are available, their capabilities, context lengths, and pricing.
Endpoints
GET https://api.tensoras.ai/v1/models
GET https://api.tensoras.ai/v1/models/{model_id}Authentication
Authorization: Bearer tns_your_key_hereList Models
Retrieve a list of all models currently available on the Tensoras platform.
Request
GET /v1/modelsNo request body is required.
Response Body
{
"object": "list",
"data": [
{
"id": "llama-3.3-70b",
"object": "model",
"created": 1709123456,
"owned_by": "meta",
"capabilities": {
"chat_completion": true,
"completion": true,
"function_calling": true,
"json_mode": true,
"streaming": true
},
"context_length": 131072,
"pricing": {
"prompt": 0.0008,
"completion": 0.0008,
"unit": "per_1k_tokens"
}
},
{
"id": "llama-3.1-8b",
"object": "model",
"created": 1709123456,
"owned_by": "meta",
"capabilities": {
"chat_completion": true,
"completion": true,
"function_calling": true,
"json_mode": true,
"streaming": true
},
"context_length": 131072,
"pricing": {
"prompt": 0.0002,
"completion": 0.0002,
"unit": "per_1k_tokens"
}
},
{
"id": "qwen-3-32b",
"object": "model",
"created": 1709123456,
"owned_by": "alibaba",
"capabilities": {
"chat_completion": true,
"completion": true,
"function_calling": true,
"json_mode": true,
"streaming": true
},
"context_length": 32768,
"pricing": {
"prompt": 0.0006,
"completion": 0.0006,
"unit": "per_1k_tokens"
}
}
]
}| Field | Type | Description |
|---|---|---|
object | string | Always "list". |
data | array | A list of model objects. |
data[].id | string | The model identifier used in API requests. |
data[].object | string | Always "model". |
data[].created | integer | Unix timestamp of when the model was added. |
data[].owned_by | string | The organization that created the model. |
data[].capabilities | object | Describes what the model supports. |
data[].capabilities.chat_completion | boolean | Whether the model supports chat completions. |
data[].capabilities.completion | boolean | Whether the model supports legacy completions. |
data[].capabilities.function_calling | boolean | Whether the model supports function/tool calling. |
data[].capabilities.json_mode | boolean | Whether the model supports JSON mode output. |
data[].capabilities.streaming | boolean | Whether the model supports streaming responses. |
data[].context_length | integer | Maximum context length in tokens. |
data[].pricing | object | Pricing information. |
data[].pricing.prompt | number | Cost per unit for prompt tokens. |
data[].pricing.completion | number | Cost per unit for completion tokens. |
data[].pricing.unit | string | The pricing unit, e.g. "per_1k_tokens". |
Available Models
| Model | Provider | Context Length | Description |
|---|---|---|---|
llama-3.3-70b | Meta | 131,072 | High-performance general-purpose model with excellent reasoning. |
llama-3.1-8b | Meta | 131,072 | Fast and cost-effective model for simpler tasks. |
qwen-3-32b | Alibaba | 32,768 | Strong multilingual model with broad capabilities. |
mistral-7b-instruct | Mistral | 32,768 | Efficient instruction-following model. |
deepseek-r1-distill-70b | DeepSeek | 65,536 | Reasoning-focused model with chain-of-thought capabilities. |
codestral-latest | Mistral | 32,768 | Specialized model for code generation and understanding. |
Get Model
Retrieve details about a specific model.
Request
GET /v1/models/{model_id}| Parameter | Type | Required | Description |
|---|---|---|---|
model_id | string | Yes | The ID of the model to retrieve (path parameter). |
Response Body
{
"id": "llama-3.3-70b",
"object": "model",
"created": 1709123456,
"owned_by": "meta",
"capabilities": {
"chat_completion": true,
"completion": true,
"function_calling": true,
"json_mode": true,
"streaming": true
},
"context_length": 131072,
"pricing": {
"prompt": 0.0008,
"completion": 0.0008,
"unit": "per_1k_tokens"
}
}Examples
List All Models
curl
curl https://api.tensoras.ai/v1/models \
-H "Authorization: Bearer tns_your_key_here"Python
from openai import OpenAI
client = OpenAI(
base_url="https://api.tensoras.ai/v1",
api_key="tns_your_key_here",
)
models = client.models.list()
for model in models.data:
print(f"{model.id} (owned by {model.owned_by})")Node.js
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.tensoras.ai/v1",
apiKey: "tns_your_key_here",
});
const models = await client.models.list();
for (const model of models.data) {
console.log(`${model.id} (owned by ${model.owned_by})`);
}Get Model Details
curl
curl https://api.tensoras.ai/v1/models/llama-3.3-70b \
-H "Authorization: Bearer tns_your_key_here"Python
from openai import OpenAI
client = OpenAI(
base_url="https://api.tensoras.ai/v1",
api_key="tns_your_key_here",
)
model = client.models.retrieve("llama-3.3-70b")
print(f"Model: {model.id}")
print(f"Owner: {model.owned_by}")Node.js
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.tensoras.ai/v1",
apiKey: "tns_your_key_here",
});
const model = await client.models.retrieve("llama-3.3-70b");
console.log(`Model: ${model.id}`);
console.log(`Owner: ${model.owned_by}`);Error Handling
{
"error": {
"message": "Model 'nonexistent-model' not found",
"type": "not_found_error",
"param": "model_id",
"code": "model_not_found"
}
}