For code security, we recommend:
- Managing sensitive information (such as API Keys) through environment variables. For Python calls, use
os.getenv("AIHUBMIX_API_KEY")
. - Avoiding printing sensitive information in logs/outputs.
- Preventing key leakage by adding .env to .gitignore to keep secrets out of the code repository.
Authorizations
Body
application/json
Conversation messages including role and content.
Sampling temperature (0-2). Higher values yield more randomness.
Maximum number of tokens to generate (depends on model).
Top-p nucleus sampling parameter controlling diversity.
Frequency penalty to reduce repetition.
Presence penalty to encourage new topics.
Enable streaming responses for real-time output.
Web search options (only supported by specific search models).