Get started with the API
AI Studio exposes an OpenAI-compatible API for inference, image generation, fine-tuning, and more. Create a key, make your first request, then explore the full API reference.
Before you begin
You'll need:
- A Hyperstack account. Sign up on the registration page using your email or an SSO provider (Google, Microsoft, or GitHub).
- Billing set up. Add credit to your account.
- Access to AI Studio. Open AI Studio in the Hyperstack console.
Create a key and make your first request
-
Create an API key
Navigate to the API Keys page under Manage. Click Generate new API key, name it, and confirm. Copy the key right away, since it is shown only once.
-
Make your first request
Call the chat completions endpoint, replacing
API_KEYwith your key:terminalcurl -X POST "https://console.hyperstack.cloud/ai/api/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "api_key: API_KEY" \
-d '{
"model": "mistralai/Mistral-Small-24B-Instruct-2501",
"messages": [
{"role": "user", "content": "Hello"}
],
"stream": true
}'A streamed completion confirms your key works. The API follows the OpenAI format, so existing OpenAI SDKs and tools work once you point them at the AI Studio base URL.
What's next
Once you're authenticated, these are the main things you can do with the API. Each card links to the relevant section of the API reference:
Run inference
Send chat completion requests to any base or fine-tuned model.
Generate images
Create images from a text prompt, or edit an existing image.
AI Studio API reference
Browse every endpoint, parameter, and schema, including models, datasets, and evaluations.
Overview
Browse the full AI Studio documentation.
Fine-tuning is a multi-step workflow that uploads training data, starts a job, and deploys the result, so the simplest path is the console UI. Follow the Fine-tune a model guide. To do it programmatically, see the Fine-tuning section of the API reference.
To use AI Studio inside an app you already have, see Integrations for Cursor, Claude Code, n8n, LiteLLM, and more.