API Endpoints

Fizzly API provides the following endpoints, fully compatible with OpenAI API format.

Base URL

https://api.fizzly.com/v1

Chat Completions

Create chat completions.

Endpoint

POST /v1/chat/completions

Request Parameters

ParameterTypeRequiredDescription
modelstringYesModel name
messagesarrayYesMessage array
temperaturenumberNoSampling temperature (0-2)
max_tokensintegerNoMaximum tokens to generate
streambooleanNoEnable 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/embeddings

Request Example

{
  "model": "text-embedding-3-small",
  "input": "Hello, world!"
}

Models

List available models.

Endpoint

GET /v1/models

Response Example

{
  "object": "list",
  "data": [
    {"id": "gpt-4o", "object": "model"},
    {"id": "gpt-4-turbo", "object": "model"},
    {"id": "claude-3-5-sonnet-20241022", "object": "model"}
  ]
}