Skip to content
Most AI tasks no longer need a frontier model Read launch post

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.

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-..."

Needs Python 3.12 or newer.

pip install sie-sdk

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 Serverless
result = client.encode("BAAI/bge-m3", {"text": "Hello from SIE"})
print(len(result["dense"]), "dimensions")

Run it:

python quickstart.py

Expected output:

1024 dimensions

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.

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.

Talk to us

Tell us about your use case and we'll get back to you shortly.