Skip to main content

Accessing the API

All API endpoints are available at https://api.thesys.dev/v1.

Authentication

Authentication is done via API keys. You can create API keys from the keys page. API keys must be sent as a Authorization header with the value Bearer <api_key>. If the API key is not valid, you will receive a 403 error.

Rate Limits

Please refer to the Rate Limits page for more information.

Errors

Please refer to the Errors page for more information.

Examples

For Chat Completions API

from openai import OpenAI
client = OpenAI(
    base_url="https://api.thesys.dev/v1/embed",
    api_key="<api_key>"
)

completion = client.chat.completions.create(
model="c1/anthropic/claude-sonnet-4/v-20250930",
messages=[
{
"role": "user",
"content": "How did the population of the world grow from 1950 to 2020?"
}
])

Stream this response via the language specific helper functions to the react client.

For Responses API

from openai import OpenAI
client = OpenAI(
    base_url="https://api.thesys.dev/v1/embed",
    api_key="<api_key>"
)

response = client.responses.create(
model="c1/anthropic/claude-sonnet-4/v-20250930",
input="How did the population of the world grow from 1950 to 2020?"
)

print(response)

Chat Completions API

For C1 Gemini models, the reasoning_effort parameter translates to the following max reasoning tokens:
reasoning_effort3 Flash - Max reasoning tks3 Pro - Max reasoning tks
none0256
minimal512512
low10241024
medium20482048
high40964096
xhigh81928192
PropertyC1 OpenAI modelsC1 Anthropic Models
messages (audio not supported) (audio not supported)
model
audio
frequency_penalty
function_calluse tool_choiceuse tool_choice
functionsuse toolsuse tools
logit_bias
logprobs
max_completion_tokens
max_tokens
metadatathesys metadata onlythesys metadata only
modalities
nmust be 1must be 1
parallel_tool_calls true by default true by default
prediction
presence_penalty
prompt_cache_key
reasoning_effort
response_format
service_tier
stop
stream
temperature
tool_choice
tools
top_p
verbosity
web_search_options

Responses API

All C1 models are supported via the Responses API, including OpenAI and non-OpenAI models. Our Responses API implementation is Open Responses compliant.
There are three ways to maintain chat history in Responses API:
  1. Pass the full conversation history — Include all previous messages in the input array with each request.
  2. Use previous_response_id — Reference a prior response by its ID to automatically chain conversations (requires store: true).
  3. Use conversation — Group related responses into a named conversation for persistent multi-turn context (requires store: true).
To create a conversation using previous_response_id:
from openai import OpenAI
client = OpenAI(
    base_url="https://api.thesys.dev/v1/embed",
    api_key="<api_key>"
)

response = client.responses.create(
model="c1/anthropic/claude-sonnet-4/v-20250930",
input="What is the capital of France?"
)

follow_up = client.responses.create(
model="c1/anthropic/claude-sonnet-4/v-20250930",
input="And what is its population?",
previous_response_id=response.id
)

print(follow_up)

To create a conversation and use it across multiple requests:
from openai import OpenAI

# Client for conversation management

conv_client = OpenAI(
base_url="https://api.thesys.dev",
api_key="<api_key>"
)

# Client for generation

embed_client = OpenAI(
base_url="https://api.thesys.dev/v1/embed",
api_key="<api_key>"
)

conversation = conv_client.conversations.create()

response = embed_client.responses.create(
model="c1/anthropic/claude-sonnet-4/v-20250930",
input="What is the capital of France?",
store=True,
conversation={"id": conversation.id}
)

follow_up = embed_client.responses.create(
model="c1/anthropic/claude-sonnet-4/v-20250930",
input="And what is its population?",
store=True,
conversation={"id": conversation.id}
)

print(follow_up)

Built-in tools (web_search, file_search, code_interpreter, computer_use, mcp) will be supported soon.
PropertySupported
background Always false
conversation with store: true
include
input
instructions
max_output_tokens
max_tool_calls
metadata thesys metadata only
model
parallel_tool_calls true by default
previous_response_id with store: true
prompt
prompt_cache_key
prompt_cache_retention
reasoning effort only
safety_identifier
service_tier
store true by default
stream
temperature
text verbosity only
tool_choice
tools function only; built-in tools coming soon
top_logprobs
top_p

input item types

Input Item TypeSupported
message (user/system/developer/assistant)
function_call
function_call_output
item_reference
reasoning
compaction coming soon
web_search_call coming soon
file_search_call coming soon
computer_call / computer_call_output coming soon
code_interpreter_call coming soon
image_generation_call coming soon
local_shell_call / local_shell_call_output
shell_call / shell_call_output
apply_patch_call / apply_patch_call_output
mcp_list_tools / mcp_approval_request / mcp_approval_response / mcp_call coming soon
custom_tool_call / custom_tool_call_output

text sub-fields

PropertySupported
text.verbosity
text.format Always Thesys format