API Reference
cURL recipes
Copy-paste one-liners to hit the Meridian API directly. Replace $NIMBUS_API_KEY with your key from the dashboard.
Chat Completion
Send a single-turn chat request with a system prompt and user message.
curl https://api.getnimbus.net/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $NIMBUS_API_KEY" \
-d '{
"model": "meridian-1",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain quantum entanglement in one sentence."}
],
"temperature": 0.7,
"max_tokens": 256
}'Streaming Chat
Stream tokens as server-sent events by setting stream: true.
curl -N https://api.getnimbus.net/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $NIMBUS_API_KEY" \
-d '{
"model": "meridian-1",
"messages": [
{"role": "user", "content": "Write a haiku about recursion."}
],
"stream": true
}'Vision
Pass a base64-encoded image alongside a text prompt.
curl https://api.getnimbus.net/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $NIMBUS_API_KEY" \
-d '{
"model": "meridian-vision",
"messages": [
{
"role": "user",
"content": [
{"type": "text", "text": "What is in this image?"},
{
"type": "image_url",
"image_url": {
"url": "data:image/jpeg;base64,$(base64 -w0 photo.jpg)"
}
}
]
}
],
"max_tokens": 300
}'Function Calling
Define tools and let the model return a structured JSON call.
curl https://api.getnimbus.net/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $NIMBUS_API_KEY" \
-d '{
"model": "meridian-1",
"messages": [
{"role": "user", "content": "What is the weather in Berlin?"}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather for a city",
"parameters": {
"type": "object",
"properties": {
"city": {"type": "string", "description": "City name"}
},
"required": ["city"]
}
}
}
],
"tool_choice": "auto"
}'Embeddings
Generate a vector embedding for semantic search or clustering.
curl https://api.getnimbus.net/v1/embeddings \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $NIMBUS_API_KEY" \
-d '{
"model": "meridian-embed",
"input": "The quick brown fox jumps over the lazy dog.",
"encoding_format": "float"
}'