olyx init
Create configuration and a sample request without saving API keys.
olyx init [--provider NAME] [--model MODEL] [--alias ALIAS] [--base-url URL] [--config FILE]Create a configuration file and a request.json in the same directory. If the
configuration already exists, the command stops without changing it. If only the
request file exists, Olyx keeps it. API keys stay in environment variables.
The command does not contact a provider or check whether you can use a model.
| Option | Behavior |
|---|---|
--provider NAME |
Choose openai or huggingface; otherwise detect one from its API-key variable |
--model MODEL |
Choose the model name accepted by your provider |
--alias ALIAS |
Name the route your application will use; default fast |
--base-url URL |
Override a compatible HTTP endpoint |
--config FILE |
Output path; defaults to OLYX_CONFIG or ./olyx.json |
If no recognized API key is set, Olyx uses the OpenAI settings. If both
OPENAI_API_KEY and HF_TOKEN are set, choose one with --provider. Presets are openai and
huggingface; Hugging Face requires --model with a model served by its router.
Olyx adds both your alias and the provider model name to the configuration.
For a service with a different request format, use a
provider plugin. See provider setup.
olyx init --provider openaiolyx check olyx.jsonolyx route --input request.jsonolyx serveTo save a Hugging Face route in a separate file:
export HF_TOKEN=your-provider-tokenolyx init --provider huggingface --model YOUR_HF_MODEL_ID --config huggingface.jsonolyx check huggingface.jsonFor an OpenAI-compatible custom endpoint:
olyx init --provider openai --model YOUR_MODEL \ --base-url https://inference.example.com/v1 --config custom.jsonThe OpenAI preset names OPENAI_API_KEY; set that environment variable to the
credential accepted by your custom endpoint.
The generated file contains model routes. Olyx creates data/traces.db beside
the configuration when a command first opens trace storage. See Storage.