TESSEN Platform
Documentation
Docs/Developer tools
DEVELOPER TOOLS

SDK examples

No Tessen SDK package is published. OpenAI-compatible clients and plain HTTP both work.

Limit

Tessen publishes no SDK package for Python or JavaScript. TypeScript and Python clients exist in Tessen's repository but are published to no registry, so there is no install command to copy. Tessen has published no registry package, so do not install one called tessen expecting it to be Tessen's.

The chat completions endpoint follows the OpenAI chat format, so OpenAI's own client libraries work when pointed at https://api.tessen.ai/v1. These are third-party packages that Tessen does not maintain; the examples below use only the documented parameters.

OPENAI-COMPATIBLE CLIENT
# pip install openaiimport osfrom openai import OpenAI client = OpenAI(base_url="https://api.tessen.ai/v1", api_key=os.environ["TESSEN_API_KEY"]) completion = client.chat.completions.create(    model="z1",    max_tokens=256,    messages=[{"role": "user", "content": "Reply with the single word: ok"}],)print(completion.choices[0].message.content) stream = client.chat.completions.create(    model="z1",    max_tokens=256,    stream=True,    messages=[{"role": "user", "content": "Say hello in five words."}],)for chunk in stream:    if chunk.choices and chunk.choices[0].delta.content:        print(chunk.choices[0].delta.content, end="")print()

Or use plain HTTP

Every example in these docs uses cURL, Python's requests, or Node.js's built-in fetch, and works in any language that can send an HTTPS request.

Search documentation

Titles, headings and guides↑ ↓ navigate · Enter open
SDK examples · Tessen Docs