Getting Started
Get up and running with the Cortiqa API in 5 minutes. This guide walks you through getting your API key, installing the official SDK, and running your first inference.
Navigate to platform.cortiqa.co/api-keys and generate a secret API key. It starts with sk-cortiqa-....
export CORTIQA_API_KEY=sk-cortiqa-your-api-key-hereChoose your preferred language:
# Python
pip install cortiqa
# TypeScript / Node.js
npm install @cortiqa/sdk
# Go
go get github.com/cortiqa-ai/cortiqa-sdk-goCreate a file named main.py using the official cortiqa package:
1from cortiqa import Cortiqa23# Automatically reads CORTIQA_API_KEY from environment4client = Cortiqa()56response = client.chat.completions.create(7 model="openai/gpt-oss-120b",8 messages=[9 {"role": "system", "content": "You are a helpful assistant by Cortiqa."},10 {"role": "user", "content": "Explain quantum entanglement in two sentences."}11 ],12 temperature=0.7,13)1415print(response.choices[0].message.content)Using @cortiqa/sdk in Node.js or modern frontends:
1import Cortiqa from "@cortiqa/sdk";23const client = new Cortiqa();45async function main() {6 const message = await client.messages.create({7 model: "openai/gpt-oss-120b",8 max_tokens: 1024,9 messages: [10 { role: "user", content: "Explain how DNS resolution works in 2 sentences." }11 ],12 });1314 console.log(message.content);15}1617main();Stream tokens directly as they are synthesized on Cortiqa LPU nodes:
1import sys2from cortiqa import Cortiqa34client = Cortiqa()56stream = client.chat.completions.create(7 model="openai/gpt-oss-120b",8 messages=[{"role": "user", "content": "Write a short poem about space exploration."}],9 stream=True,10)1112for chunk in stream:13 if chunk.choices and chunk.choices[0].delta.content:14 sys.stdout.write(chunk.choices[0].delta.content)15 sys.stdout.flush()