> ## Documentation Index
> Fetch the complete documentation index at: https://docs.traceport.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> Traceport Gateway API — OpenAI-compatible unified gateway for multiple LLM providers.

The Traceport Gateway API provides an **OpenAI-compatible** interface that supports multiple LLM providers (OpenAI, Anthropic, Google, Bedrock) through a single set of endpoints.

## Base URL

```
https://api.traceport.ai/v1
```

## Authentication

All endpoints require API key authentication via the `Authorization` header:

```
Authorization: Bearer <YOUR_TRACEPORT_API_KEY>
```

You can generate API keys from the [API Keys](/management/api-keys) section in the Traceport dashboard.

## Available Endpoints

<CardGroup cols={2}>
  <Card title="Chat Completions" icon="comments" href="/api-reference/endpoint/create-chat-completion">
    Create chat completions with streaming support.
  </Card>

  <Card title="Embeddings" icon="vector-square" href="/api-reference/endpoint/create-embeddings">
    Generate text embedding vectors.
  </Card>

  <Card title="Batches" icon="layer-group" href="/api-reference/endpoint/create-batch">
    Create and manage batch processing jobs.
  </Card>

  <Card title="Files" icon="file" href="/api-reference/endpoint/upload-file">
    Upload and manage files for batch processing.
  </Card>

  <Card title="Workflows" icon="diagram-project" href="/api-reference/endpoint/execute-workflow">
    Execute server-side workflows.
  </Card>

  <Card title="Prompts" icon="terminal" href="/api-reference/endpoint/run-prompt">
    Run published prompt templates via API.
  </Card>

  <Card title="Real-time & WebSockets" icon="bolt" href="/api-reference/realtime/overview">
    Build interactive, low-latency AI applications with persistent connections.
  </Card>
</CardGroup>

## OpenAI SDK Compatibility

Because the Traceport Gateway is OpenAI-compatible, you can use standard SDKs by simply changing the `base_url`:

<CodeGroup>
  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(
      api_key="<YOUR_TRACEPORT_API_KEY>",
      base_url="https://api.traceport.ai/v1"
  )

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

  ```javascript Node.js theme={null}
  import OpenAI from "openai";

  const client = new OpenAI({
    apiKey: "<YOUR_TRACEPORT_API_KEY>",
    baseURL: "https://api.traceport.ai/v1"
  });

  const response = await client.chat.completions.create({
    model: "gpt-4o",
    messages: [{ role: "user", content: "Hello!" }]
  });
  ```
</CodeGroup>
