Using API Keys
What are API Keys?
API keys let you access Boise State AI Chat through code instead of the web interface. This is useful for automating tasks, building custom applications, or integrating AI into your existing workflows.
Key Points
One active key per user
Keys expire after 90 days
Usage counts against your monthly quota
API conversations are not saved to your chat history
Requires basic programming knowledge
Pro tip: Use AI to help you troubleshoot your code! This can be useful if you come across “invalid key” or 401 errors during the process. You can paste your code into the prompt window without the API key to get feedback on your code.
Getting Your API Key
Log into https://boisestate.ai/api-keys using your Boise State credentials.
Click or tap Create API Key and give it a name.
Save the key immediately - you can't retrieve it later!
Quick Start Examples
Simple Message Request
Conversation with Context
Streaming Responses (Real-time)
Request Parameters
Required:
message(string) ORmessages(array) - Your inputmodelId(string) - Which AI model to use
Optional:
systemPrompt(string) - Instructions for AI behaviortemperature(number, 0.0-1.0) - Response creativity (default: 0.7)maxTokens(number) - Maximum response lengthtopP(number, 0.0-1.0) - Sampling parameter (default: 0.9)
Two Endpoints
EndpointUse CaseResponse/chat/api-converseSimple requests, batch processingComplete response at once (JSON)/chat/api-chatInteractive apps, real-time feedbackStreaming word-by-word (SSE)Important Notes
No default system prompts: Unlike the web interface, API requests have no default instructions. Add a systemPrompt if you want to guide the AI's behavior.
No conversation memory: Each request is independent. To maintain context, include previous messages in the messages array.
Security
Never commit API keys to code repositories
Store keys in environment variables
Treat them like passwords
Common Errors
401 Unauthorized: Invalid or expired API key
403 Forbidden: Monthly quota exceeded
400 Bad Request: Check your request format (can't send both
messageandmessages)
Need Help?
Manage your keys: https://boisestate.ai/api-keys.
Full documentation: Available on the api-keys page.