SIE Serverless quickstart
SIE Serverless runs the models for you, so there is no server to start. You need an API key and the SDK. To run SIE on your own machine instead, see the self-hosted Quickstart.
Get an API key
Section titled “Get an API key”Sign in to the console. Use the key it showed you after sign-up, or create one under API keys. The console shows a key’s secret only once, so copy it when you see it. Use a key in the US region; EU keys cannot run inference yet.
Put the key in the SIE_API_KEY environment variable:
export SIE_API_KEY="sk-sie-..."Install the SDK
Section titled “Install the SDK”Needs Python 3.12 or newer.
pip install sie-sdkNeeds Node.js 22 or newer.
npm install @superlinked/sie-sdkNothing to install.
Make your first call
Section titled “Make your first call”This encodes one sentence with BAAI/bge-m3 and prints the size of the vector.
Save this as quickstart.py:
from sie_sdk import SIEClient
client = SIEClient() # reads SIE_API_KEY and uses SIE Serverlessresult = client.encode("BAAI/bge-m3", {"text": "Hello from SIE"})print(len(result["dense"]), "dimensions")Run it:
python quickstart.pyExpected output:
1024 dimensionsSave this as quickstart.mjs:
import { SIEClient } from "@superlinked/sie-sdk";
const client = new SIEClient(); // reads SIE_API_KEY and uses SIE Serverlessconst result = await client.encode("BAAI/bge-m3", { text: "Hello from SIE" });console.log(result.dense?.length, "dimensions");Run it:
node quickstart.mjsExpected output:
1024 dimensionscurl https://api.superlinked.com/v1/encode/BAAI/bge-m3 \ -H "Authorization: Bearer $SIE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"items": [{"text": "Hello from SIE"}]}'The response is JSON. It starts like this, and values holds the 1024 numbers of the vector:
{"model":"BAAI/bge-m3","items":[{"dense":{"dims":1024,"dtype":"float32","values":[...You do not pass a base URL. When the SDK has an API key and no base URL, it connects to SIE Serverless at https://api.superlinked.com. If the console shows a different endpoint for your key, set it in the SIE_BASE_URL environment variable, or with curl use it in place of https://api.superlinked.com. To set the endpoint in code instead, see the Python SDK reference or the TypeScript SDK reference.
If the first call is slow or fails
Section titled “If the first call is slow or fails”A model with no recent traffic has to start before it answers, and the first call can take a minute or more. The SDKs wait for it, so your script just takes longer.
A key created a few seconds ago can fail its first call with 503 KEY_STATE_UNAVAILABLE, because the gateway has not confirmed the key yet. Version 0.11.1 of the SDKs does not retry that error. Wait a few seconds and run the script again.
With curl or any other plain HTTP client, a cold model or a key created seconds ago answers 503, and a rate-limited request answers 429. Both carry a Retry-After header: wait that many seconds and send the request again (add -i to the curl command to see the status and headers). That is always safe for the encode call on this page. For generation calls, read Retries over HTTP first: it covers the one case where a resend can run a request twice, and has retry loops you can copy.
Next steps
Section titled “Next steps”- From signup to first embedding: the same first call as a walkthrough that starts at sign-up and ends with usage in the console
- Model Catalog: the On Serverless filter shows the models you can call
- Dense Embeddings: output types, and query vs document encoding
- Rate limits: per-key and per-organization limits
- Python SDK reference and TypeScript SDK reference