Getting started
Quickstart
Deploy a compatible model and send the first request from the OpenAI SDK.
1. Create an API key
Select your workspace and open Try models → API Keys. Select Create API key and copy the complete value before closing the dialog; it is shown only once. Store it in your secret manager.
1export QDIV0_API_KEY="your-api-key"2. Launch a model
Open Deployments and select Deploy model. Choose a compatible model from Hugging Face or another supported source, review the runtime and infrastructure, then deploy it. Wait until its status is Running and note its serving name. Alternatively, select an available ready-to-use model in Try models.
3. Send a request
First try the model in Try models → Chat: choose the model, enter a message and send it. Use Code to inspect an example. For your application, install the OpenAI Python SDK and use the deployment serving name or selected model identifier below.
1import os
2from openai import OpenAI
3
4client = OpenAI(
5 base_url="https://api.qdiv0.com/v1",
6 api_key=os.environ["QDIV0_API_KEY"],
7)
8
9response = client.chat.completions.create(
10 model="your-serving-name",
11 messages=[{"role": "user", "content": "Hello"}],
12)
13
14print(response.choices[0].message.content)API example
Check the key and copy a model identifier from the response.
Set QDIV0_API_KEY to an account tk_ key or personal uk_ key. A personal key uses its default account unless you select another with X-Account-ID.
1curl --fail-with-body \
2 "https://api.qdiv0.com/v1/models" \
3 -H "Authorization: Bearer $QDIV0_API_KEY"