Quick Start

Send First Request

Make your first API call in 5 minutes.

Base URL

Use the dedicated API domain for API traffic. For OpenAI SDKs, base_url must include /v1:

https://api.tensoraxis.ai/v1

If you build HTTP URLs manually, use https://api.tensoraxis.ai as the API origin and append the endpoint path, such as /v1/chat/completions. See Base URL for details.

curl

curl https://api.tensoraxis.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TENSORAXIS_API_KEY" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Python

from openai import OpenAI

client = OpenAI(
    api_key="your-tensoraxis-api-key",
    base_url="https://api.tensoraxis.ai/v1",
)

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

Node.js

import OpenAI from 'openai'

const client = new OpenAI({
  apiKey: process.env.TENSORAXIS_API_KEY,
  baseURL: 'https://api.tensoraxis.ai/v1',
})

const response = await client.chat.completions.create({
  model: 'gpt-4o',
  messages: [{ role: 'user', content: 'Hello!' }],
})
console.log(response.choices[0].message.content)

Common OpenAI-compatible APIs such as Chat Completions, Embeddings and Images usually only require changing base_url and api_key. Video generation is an async task API; see Video Generation for the correct request body.