https://api.hyprlab.io/v1
https://api.hyprlab.io/v1/chat/completions
curl https://api.hyprlab.io/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HYPRLAB_API_KEY" \
-d '{
"model": "grok-beta",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Say this is a test!"
}
]
}'
curl https://api.hyprlab.io/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HYPRLAB_API_KEY" \
-d '{
"model": "grok-beta",
"messages": [
{
"role": "user",
"content": "What'\''s the weather like in Boston today?"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
},
"unit": {
"type": "string",
"enum": ["celsius", "fahrenheit"]
}
},
"required": ["location"]
}
}
}
],
"tool_choice": "auto"
}'
curl https://api.hyprlab.io/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HYPRLAB_API_KEY" \
-d '{
"model": "grok-beta",
"messages": [
{
"role": "user",
"content": "Hello!"
}
],
"logprobs": true,
"top_logprobs": 2
}'