Blyss

Confidential AI API

Beta
Key IDSecret
Beta APIsk-2de4444643ce40b99d1d0e191cd7cbc7

How to Use


Supported Models

The dev environment currently hosts a single model:

mistralai/Mistral-7B-Instruct-v0.2

Email us if you'd like a different model.

Note that Mistral models do not use an explicit system prompt. Instead, the first message should be "role": "user", and contain all instructions and context.

OpenAI Client

If you use an LLM interface library, try using the Blyss API like you would the OpenAI API (after changing the endpoint and key). Prompt adjustments may be necessary.

import openai
openai.api_key = os.getenv("BLYSS_API_KEY")
openai.api_endpoint = "https://enclave.blyss.dev/v1"

Plain JSON

Otherwise, you can use the JSON API directly. Here's a cURL example to demonstrate the structure of our interface:

curl https://enclave.blyss.dev/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $BLYSS_API_KEY" \
-d '{
"model": "mistralai/Mistral-7B-Instruct-v0.2",
"messages": [{
"role": "user",
"content": "Say this is a test!"
}],
"temperature": 0.7
}'
# Response:
{
"id": "cmpl-0a123456789e45748761306abcdabcdd",
"object": "chat.completion",
"created": 2108311,
"model": "mistralai/Mistral-7B-Instruct-v0.2",
"choices":[
{
"index": 0,
"message": {"role":"assistant","content":"This is a test!"},
"finish_reason":"stop"
}
],
"usage": {
"prompt_tokens": 15,
"total_tokens": 20,
"completion_tokens": 5
}
}