HTTP Client Integration
Use any HTTP client to send Responses or Messages API requests directly to Thesean. This is ideal for custom integrations, server-side applications, or languages without an official SDK.
Ensure you have your Thesean API key from the Thesean Dashboard before continuing.
Authentication
Include your API key as a bearer token in every request:
Authorization: Bearer THESEAN_API_KEY
cURL
curl https://api.thesean.ai/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer THESEAN_API_KEY" \
-d '{
"model": "ship-like/gpt-5.6-sol",
"input": "What is Olympus Mons?"
}'
Python
Using httpx
import httpx
response = httpx.post(
"https://api.thesean.ai/v1/responses",
headers={
"Authorization": "Bearer THESEAN_API_KEY",
"Content-Type": "application/json",
},
json={
"model": "ship-like/gpt-5.6-sol",
"input": "What is Olympus Mons?",
},
timeout=60.0,
)
response.raise_for_status()
print(response.json()["output"][0]["content"][0]["text"])
JavaScript
Using fetch
const response = await fetch("https://api.thesean.ai/v1/messages", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.THESEAN_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "ship-like/claude-opus-4-8",
max_tokens: 1024,
messages: [{ role: "user", content: "What is Olympus Mons?" }],
}),
});
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`);
}
const data = await response.json();
console.log(data.content[0].text);