Quickstart Guide
Getting Started with Hyperbolic Serverless Inference
Once we have created a Hyperbolic account, API key, and configured your billing, we can send our first inference request!
Text Generation
Llama 3.1 70B Instruct
ShellPythonTypeScript
curl -X POST "https://api.hyperbolic.xyz/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HYPERBOLIC_API_KEY" \
-d '{
"messages": [
{
"role": "system",
"content": "You are a helpful and polite assistant."
},
{
"role": "user",
"content": "What is Chinese hotpot?"
}
],
"model": "meta-llama/Meta-Llama-3.1-70B-Instruct",
"presence_penalty": 0,
"temperature": 0.1,
"top_p": 0.9,
"stream": false
}'
Image Generation
Stable Diffusion
Shell
curl -X POST "https://api.hyperbolicai.xyz/v1/image/generation" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HYPERBOLIC_API_KEY" \
-d '{
"model_name": "SDXL1.0-base",
"prompt": "a photo of an astronaut riding a horse on mars",
"height": 1024,
"width": 1024,
"backend": "auto"
}' | jq -r ".images[0].image" | base64 -d > result.jpg
Audio Generation
Melo TTS
Shell
curl -X POST "https://api.hyperbolicai.xyz/v1/audio/generation" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HYPERBOLIC_API_KEY" \
-d '{
"text": "Hi! Welcome to Hyperbolic."
}' | jq -r ".audio" | base64 -d > result.mp3
Last updated