Large Language Models $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="https://rssamplifier.com/api/frame?u=https%3A%2F%2Fdocs.codio.com%2Finstructors%2Fadmin%2Forganization%2Fllms.html#large-language-models">
You can add your own LLM API keys to your Codio organization to use in your Course from the Organization > LLMs page in Codio.
We support the following providers:
Custom LLM Providers $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="https://rssamplifier.com/api/frame?u=https%3A%2F%2Fdocs.codio.com%2Finstructors%2Fadmin%2Forganization%2Fllms.html#custom-llm-providers">
You can add a custom LLM provider, such as Google Gemini, to Codio by entering the API keys on the Organization > LLMs page. This allows you to use your chosen LLM provider in your courses.
Steps to Add a Custom LLM Provider $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="https://rssamplifier.com/api/frame?u=https%3A%2F%2Fdocs.codio.com%2Finstructors%2Fadmin%2Forganization%2Fllms.html#steps-to-add-a-custom-llm-provider" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#steps-to-add-a-custom-llm-provider'">
Click Add provider and enter the following details:
Name: A recognizable name for the provider.
Provider: The name of the LLM service.
Endpoint: The API endpoint URL for the provider.
API Key: The authentication key needed to access the provider.
Authentication: Select the authentication type (e.g., Header or Query Param).
Auth Template: Specify the authorization format.
Endpoint Environment Variable: Define an environment variable for the API endpoint.
API Key Environment Variable: Define an environment variable for the API key.
Click Create to save and activate the provider.
Examples of how to use a custom LLM provider $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="https://rssamplifier.com/api/frame?u=https%3A%2F%2Fdocs.codio.com%2Finstructors%2Fadmin%2Forganization%2Fllms.html#examples-of-how-to-use-a-custom-llm-provider" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#examples-of-how-to-use-a-custom-llm-provider'">
OpenAI:
name: your openai custom name (custom value)
provider: openai (custom value)
endpoint: https://api.openai.com/v1
API key: your API key from openai
authentication: Header
auth template: Authorization: Bearer {{apikey}}
endpoint environment variable: OPENAI_CUSTOM_URL (custom value)
API key environment variable: OPENAI_CUSTOM_KEY (custom value)
After saving the parameters in the organization and enabling the provider in the course, run the script below in the assignment.
#!/bin/bash
SUB_PATH=/v1/chat/completions
LLM_URL=$OPENAI_CUSTOM_URL$SUB_PATH
curl -X POST $LLM_URL -H "Authorization: Bearer $OPENAI_CUSTOM_KEY" -H "Content-Type: application/json" -d '{"model": "gpt-3.5-turbo", "messages": [{"role": "system", "content": "your question here" }]}'
Gemini:
name: your gemini custom name (custom value)
provider: gemini (custom value)
API key: your API key from gemini
authentication: Query param
auth template: key={{apikey}}
endpoint environment variable: GEMINI_CUSTOM_URL (custom value)
API key environment variable: GEMINI_CUSTOM_KEY (custom value)
The script:
#!/bin/bash
SUB_PATH=/v1beta/models/gemini-2.0-flash:generateContent
LLM_URL=$GEMINI_CUSTOM_URL$SUB_PATH?key=$GEMINI_CUSTOM_KEY
curl -X POST $LLM_URL -H "Content-Type: application/json" -d '{"contents": [{"parts":[{"text": "your question here"}]}]}'
Note
SDKs may require or expect standard environment variables (e.g., OPENAI_BASE_URL, OPENAI_API_KEY) or explicit values, while curl can use the custom names you configure.
Enabling LLM for Courses $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="https://rssamplifier.com/api/frame?u=https%3A%2F%2Fdocs.codio.com%2Finstructors%2Fadmin%2Forganization%2Fllms.html#enabling-llm-for-courses" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#enabling-llm-for-courses'">
When keys are added, you can enable use of the key in a course. See Course LLMs.
To enable Codio LLM keys for your organization, please contact help@codio.com to initiate the process. Specify whether you require OpenAI or Anthropic keys.
LLM Organization Usage $el.setAttribute('data-tooltip', 'Copy link to this element'), 2000)" aria-label="Copy link to this element" class="headerlink" data-tooltip="Copy link to this element" href="https://rssamplifier.com/api/frame?u=https%3A%2F%2Fdocs.codio.com%2Finstructors%2Fadmin%2Forganization%2Fllms.html#llm-organization-usage" x-intersect.margin.0%.0%.-70%.0%="activeSection = '#llm-organization-usage'">
Note
The names showing in this screenshot are example names.
Usage will be shown for:
Daily, weekly, monthly and annual usage
Daily and monthly top 10 consumers by course
Each course total usage
Note
The values shown are estimates and may not reflect the exact numbers.