InferenceGetting started

First request

How to send your first request to a model with curl, Python or JavaScript and get a reply.

This page shows the shortest path from an API key to a model reply. You will need a key from the console and any one of three tools: curl, the OpenAI SDK for Python, or the OpenAI SDK for JavaScript.

Setup

Create a key in the console and put it in the YENISEI_KEY environment variable. How to do this is described on the API key page.

Request

curl https://api.yenisei.ru/v1/chat/completions \
  -H "Authorization: Bearer $YENISEI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "yenisei-100",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

What's next

  • To receive the reply in parts, as in a chat, turn on streaming.
  • All request parameters are described on the Chat Completions page.
  • The Models method shows which models are available on your plan.