CHAT
Base-Path:
https://api.hyprlab.io/v1
Chat-Completions Path:
https://api.hyprlab.io/v1/chat/completions
Making Request:
curl https://api.hyprlab.io/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HYPRLAB_API_KEY" \
-d '{
"model": "gpt-4o",
"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": "gpt-4o",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What'\''s in this image?"
},
{
"type": "image_url",
"image_url": {
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
}
}
]
}
],
"max_tokens": 300
}'
curl https://api.hyprlab.io/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HYPRLAB_API_KEY" \
-d '{
"model": "gpt-4o",
"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": "gpt-4o",
"messages": [
{
"role": "user",
"content": "Hello!"
}
],
"logprobs": true,
"top_logprobs": 2
}'
curl https://api.hyprlab.io/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HYPRLAB_API_KEY" \
-d '{
"model": "gpt-4o-2024-08-06",
"messages": [
{
"role": "system",
"content": "You extract email addresses into JSON data."
},
{
"role": "user",
"content": "Feeling stuck? Send a message to help@mycompany.com."
}
],
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "email_schema",
"schema": {
"type": "object",
"properties": {
"email": {
"description": "The email address that appears in the input",
"type": "string"
}
},
"additionalProperties": false
}
}
}
}'
curl "https://api.hyprlab.io/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HYPRLAB_API_KEY" \
-d '{
"model": "gpt-4o-audio-preview",
"modalities": ["text", "audio"],
"audio": { "voice": "alloy", "format": "wav" },
"messages": [
{
"role": "user",
"content": "Is a golden retriever a good family dog?"
}
]
}'
curl "https://api.hyprlab.io/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HYPRLAB_API_KEY" \
-d '{
"model": "gpt-4o-audio-preview",
"modalities": ["text", "audio"],
"audio": { "voice": "alloy", "format": "wav" },
"messages": [
{
"role": "user",
"content": [
{ "type": "text", "text": "What is in this recording?" },
{
"type": "input_audio",
"input_audio": {
"data": "<base64 bytes here>",
"format": "wav"
}
}
]
}
]
}'
💬 Chat Models
⚡o1 Models
⚡GPT-4o-Audio Models
⚡GPT-4-Omni Models
⚡GPT-4-Turbo Models
⚡GPT-4-32K Models
⚡ GPT-4 Models
⚡GPT-3.5-Turbo Models
Last updated