API Endpoints
Fizzly API provides the following endpoints, fully compatible with OpenAI API format.
Base URL
https://api.fizzly.com/v1Chat Completions
Create chat completions.
Endpoint
POST /v1/chat/completionsRequest Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model name |
messages | array | Yes | Message array |
temperature | number | No | Sampling temperature (0-2) |
max_tokens | integer | No | Maximum tokens to generate |
stream | boolean | No | Enable streaming |
Request Example
{
"model": "gpt-4o",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
],
"temperature": 0.7,
"max_tokens": 1000
}Response Example
{
"id": "chatcmpl-xxx",
"object": "chat.completion",
"created": 1700000000,
"model": "gpt-4o",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I help you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 20,
"completion_tokens": 10,
"total_tokens": 30
}
}Embeddings
Create text embeddings.
Endpoint
POST /v1/embeddingsRequest Example
{
"model": "text-embedding-3-small",
"input": "Hello, world!"
}Models
List available models.
Endpoint
GET /v1/modelsResponse Example
{
"object": "list",
"data": [
{"id": "gpt-4o", "object": "model"},
{"id": "gpt-4-turbo", "object": "model"},
{"id": "claude-3-5-sonnet-20241022", "object": "model"}
]
}