Authentication

You'll need to authenticate your requests to access Thesean endpoints. Thesean accepts API keys as Bearer tokens or through the Anthropic SDK's x-api-key header.

Getting Your API Key

  1. Sign up or log in to the Thesean Dashboard
  2. Navigate to the API Keys section
  3. Create a new API key or copy an existing one

Using Your API Key

Include your API key in the Authorization header:

curl https://api.thesean.ai/v1/messages \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $THESEAN_API_KEY" \
  -d '{
    "model": "ship-like/claude-opus-4-8",
    "max_tokens": 1024,
    "messages": [
      {
        "role": "user",
        "content": "Hello, world!"
      }
    ]
  }'

OpenAI Responses Setup

Use the same key with the OpenAI SDK and the Responses API:

import openai

client = openai.OpenAI(
    base_url="https://api.thesean.ai/v1",
    api_key=THESEAN_API_KEY,
)

response = client.responses.create(
    model="ship-like/gpt-5.6-sol",
    input="Hello, world!",
)

API Key Security

  • Name
    Keep it secret
    Description

    Never commit your API key to version control or expose it in client-side code.

  • Name
    Use environment variables
    Description

    Store your API key in environment variables or a secure secrets management system.

  • Name
    Rotate regularly
    Description

    Rotate your API keys periodically and immediately if you suspect they've been compromised.

  • Name
    Monitor usage
    Description

    Track your API usage in the Thesean Dashboard to detect unauthorized access.

If you believe your API key has been compromised, immediately revoke it in the Thesean Dashboard and generate a new one.

Anthropic SDK Setup

The Anthropic SDK sends your configured API key through the x-api-key header:

import anthropic

client = anthropic.Anthropic(
    base_url="https://api.thesean.ai",
    api_key=THESEAN_API_KEY,
)

Next Steps

Make Your First API Request

Get started with Thesean in less than three minutes.

Read more

Explore API Endpoints

Learn about the Responses, Chat Completions, and Messages APIs.

Read more