CloseAI

API Reference

Complete documentation for the closeAI REST API. Learn how to authenticate, make requests, and integrate our models into your applications.

Authentication

All API requests require a Bearer token in the Authorization header. You can generate API keys in your dashboard.

Authorization: Bearer YOUR_API_KEY

Chat Completions

Creates a model response for the given chat conversation.

Endpoint

POSThttps://api.trycloseai.vercel.app/v1/chat/completions

Example Request

curl https://api.trycloseai.vercel.app/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $CLOSEAI_API_KEY" \
  -d '{
    "model": "frontier-chat-v1",
    "messages": [
      {
        "role": "user",
        "content": "Hello, world!"
      }
    ]
  }'