---
title: "Chat Completions API Reference, Endpoints & Routing | CLōD Docs"
url: https://clod.io/docs/api-reference
description: "Reference for CLōD's OpenAI API compatible /v1/chat/completions endpoint: request parameters, @price / @latency / @quality routing strategies, and code examples."
lang: en
---

API Reference

# Chat Completions API

The /v1/chat/completions endpoint, built for flexibility and tuned for cost, speed, or quality.

## Endpoint

Method

POST

Base URL

https://api.clod.io

Endpoint

/v1/chat/completions

## Request body

`model``string`Model name, e.g. "clod/deepseek-v4p1-flash", or with a strategy "clod/deepseek-v4p1-flash@price"

`messages``array`Array of {role, content} objects

`temperature``number`Optional. Range 0 to 2.

`max_completion_tokens``integer`Optional. Max tokens to generate.

`stream``boolean`Optional. Enable streaming. Default: false.

## Routing strategies

Append a routing strategy to the model name using @strategy:

`@price`Route to cheapest available instance

`@latency`Route to fastest available instance

`@quality`Route to highest-quality instance

## Example

```
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.clod.io/v1",
  apiKey: process.env.CLOD_API_KEY,
});

const res = await client.chat.completions.create({
  model: "clod/deepseek-v4p1-flash",
  messages: [{ role: "user", content: "Summarize this changelog." }],
});
console.log(res.choices[0].message.content);
```

## Structured data

```json
[
  {
    "@context": "https://schema.org",
    "@graph": [
      {
        "@type": "Organization",
        "@id": "https://clod.io/#org",
        "name": "CLōD",
        "legalName": "LOD Technologies",
        "url": "https://clod.io/",
        "logo": "https://media.base44.com/images/public/69d1d3e1eda4a46222d6460a/6b2619d37_CLDLogo-NewColorffb9741.jpg",
        "sameAs": [
          "https://ca.linkedin.com/company/clodio",
          "https://x.com/clod_io",
          "https://www.youtube.com/@clod_io",
          "https://discord.com/invite/BzG9yjKSmj"
        ]
      },
      {
        "@type": "SoftwareApplication",
        "name": "CLōD API",
        "applicationCategory": "DeveloperApplication",
        "operatingSystem": "Web",
        "url": "https://clod.io/",
        "publisher": {
          "@id": "https://clod.io/#org"
        },
        "description": "One OpenAI API compatible key for text, vision, image, video, speech, transcription and embeddings models, with a Batch API, an in-browser Studio and automatic provider fallback.",
        "offers": {
          "@type": "Offer",
          "description": "Pay as you go. Add any amount of credit; your first top-up turns on daily free usage.",
          "url": "https://clod.io/pricing"
        }
      }
    ]
  },
  {
    "@context": "https://schema.org",
    "@type": "WebSite",
    "name": "CLōD's Website",
    "url": "https://clod.io"
  },
  {
    "@context": "https://schema.org",
    "@type": "Organization",
    "name": "CLōD's Website",
    "url": "https://clod.io",
    "logo": "https://media.base44.com/images/public/69d1d3e1eda4a46222d6460a/0cbc5fa78_CLoD-NewColorffb974.jpg"
  },
  {
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "Home",
        "item": "https://clod.io/"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "Integrations",
        "item": "https://clod.io/docs"
      },
      {
        "@type": "ListItem",
        "position": 3,
        "name": "Integrations",
        "item": "https://clod.io/docs/api-reference"
      }
    ]
  }
]
```