Token Factory: Quickstart
1. Create an API key
- Top up the balance.
- In the control panel, in the top menu, click Products and select Token Factory.
- In the Token Factory section, click Create API key.
- Enter the key name or click Generate.
- Select the key validity period.
- Click Create. The API key can only be viewed once after creation — copy and save it.
2. Send a test request to the model
-
Open the CLI.
-
Send a test request:
curl https://api.tf.selcloud.ru/v1/chat/completions \-H "Authorization: Bearer <api_key>" \-H "Content-Type: application/json" \-d '{"model": "<model_id>","messages": [{"role": "developer","content": "You are a helpful assistant."},{"role": "user","content": "Hello!"}]}'Specify:
-
<api_key>— API key that you created in step 1. -
<model_id>— model ID, can be copied in the control panel: in the top menu, click Products → Token Factory → Model Catalog tab → in the model card, click next to the model name.
-