SDK quickstarts
The SDK quickstarts screen lets you copy the install line and a ready quickstart of each SDK of the platform, with the address of your Control Plane already filled in. Portal path: /developer/sdk. It is used by developers who start an integration.
What the screen shows
- One tab per SDK: Python, TypeScript, Realtime, Java, Go and CLI. Python is open by default.
- In each tab:
- Install: the install command and its copy button.
- Quickstart: a read only code editor with the snippet, highlighted for its language, and a hint: chat completion through the gateway with effort and classification (Python), chat completion then streaming with server sent events (TypeScript), session created by the server and joined by the browser with its short lived token (Realtime), synchronous chat call (Java), chat call with context (Go), everyday commands of the command line tool (CLI).
The snippets take the API address configured in the portal; they never hold a key.
Actions
| Button or action | What it does | API call | Roles |
|---|---|---|---|
| SDK tab | Shows the install line and the snippet of the SDK. | None | Every signed in user |
| Copy button of Install | Copies the install command. | None | Every signed in user |
Roles
The screen reads nothing from the API and the portal asks no role. Running a snippet then needs the roles of the routes it calls.
Typical tasks
Start with the Python SDK
- Open the tab. Each SDK has its own install line. Click Python. Expected result: the install line and the Python quickstart. If it fails: reload the page.
- Install the SDK. Copy the Install line with its copy button and run it in your environment. Expected result: the package is installed. If it fails: check the access to your package mirror.
- Run the quickstart. Copy the code from Quickstart, set your key in the environment and run it. Expected result: the answer of the model. If it fails: get a complete env file from the Developer kit screen.
Pick the right SDK for a voice application
- Open Realtime. The realtime flow differs from a chat call. Click Realtime. Expected result: the snippet shows the server creating the session and the browser joining it. If it fails: reload the page.
- Split the code. The session creation runs on your server, the connection in the browser. Expected result: no long lived key in the browser. If it fails: read the SDK documentation.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| The snippet calls a wrong address | The API address of the portal is not the one your code reaches. | Replace the address in the snippet or fix the portal setting. |
| 401 when the snippet runs | No key or a wrong key in the environment. | Create a project key and set EAI_API_KEY. |
| 403 when the snippet runs | The key or the user lacks a role of the route. | Ask a tenant administrator for the role. |