Foundation Models Catalog: Quick Start
1. Create an inference service
- Select a model.
- Configure the infrastructure.
- Configure the inference service.
- Confirm the configuration.
1. Select a model
-
In the control panel, from the top menu, click Products and select Foundation Models Catalog.
-
In the model card, click Create.
-
Enter the name of the inference service.
-
To filter inference services in the list, add tags. A tag with the model name is added automatically. To add a new tag, in the Tags field, enter the tag and press Enter.
-
Optional: enter a description for the inference service. For example, specify its purpose.
-
Click Continue.
2. Configure the infrastructure
-
Set the model parameters.
1.1. Select the model parameter data type.
1.2. Select the data type for the KV cache.
1.3. Select the maximum context length.
-
Select the inference service configuration. When choosing, consider the expected model performance metrics.
You cannot change the configuration after the inference service is created.
-
Click Continue.
3. Configure the inference service
-
Configure the number of inference instances.
1.1. To have a fixed number of instances in the service, open the Fixed tab and specify the number of instances.
1.2. To use autoscaling in the service, open the Autoscaling tab and set the minimum and maximum number of instances. The number of instances will automatically change only within the specified range depending on the load on the inference service.
You can change the number of inference instances after the inference service is created. Learn more in the Scaling the inference service guide.
-
Select the disk type for the inference instance.
-
Click Continue.
4. Confirm the configuration
-
Review the final inference service configuration.
-
Check the inference service price.
-
Click Create Inference Service. Creating an inference service may take about 15 minutes.
2. Connect to the inference service
To connect to the inference service, send a test request via the Completions API or Chat API.
Use the Completions API to generate text based on a single prompt — without support for dialogue or message history. For example, to continue a phrase, generate text from a template, or perform a one-time generation.
Use the Chat API to maintain a dialogue in chatbot mode — considering roles and message history.
Completions API
Chat API
-
Open the CLI.
-
Send a test curl request:
curl <endpoint>/v1/completions \
-H "Authorization: Bearer <api_key>" \
-H "Content-Type: application/json" \
-d '{
"model": "<model>",
"prompt": "<prompt>",
"temperature": 0,
"max_tokens": 7
}'
Specify:
-
<endpoint>— inference service endpoint. You can copy the endpoint in the control panel: in the top menu, click Products → Inference Services → inference service page → Quick Start tab → in the Endpoint block, click ; -
<api_key>— API key. You can copy it in the control panel: in the top menu, click Products → Inference Services → inference service page → API Keys tab → in the API key row, click , and then ; -
<model>— model name. You can view it in the control panel: in the top menu, click Products → Inference Services → inference service page → tab Service → row Model; -
<prompt>— prompt, for example:Объясни, что такое промт
You will receive a response in OpenAI API format.