Skip to content

API Keys ​

For remote LLM tasks, you need to provide an API key to authenticate.

You can provide the API key in the following ways:

Get your API key from https://console.silk-labs.com

sh
silk login <api-key>

Options reference ​

OptionTypeDescriptionDefault
apiKeystringAPI key for remote LLM servicesnull
modelstringDefault language model to use"gpt-3.5-turbo"
temperaturenumberCreativity/randomness of model responses0.0
maxTokensnumberMaximum tokens in model response4000
timeoutnumberAPI request timeout in milliseconds30000

Config resolving ​

Most of Silk's configuration is done through a config.mjs file.

Silk will look for this file in the following locations:

  • Your home directory ~/.config/silk
  • A folder called .silk in your project directory
  • Arguments supplied in the command line

NOTE If the files above exist, they will be loaded in that order. NOTE Files loaded last will take priority.

You can also specify the --config <filename> parameter, which will only load the one config file.

Config with .env ​

Use a .env file to store sensitive information like API keys. Silk will look search for a .env file on these locations:

  • Your home directory config at ~/.config/silk
  • The root of your project