Oxlo.ai

Parameters Reference

Every model on Oxlo supports customizable inference parameters. This page documents every available parameter across all model categories, with valid ranges, defaults, and usage examples.

Tip: All parameters are optional. If omitted, sensible defaults are used. You can also try parameters interactively in the Playground.


Chat Completions

Parameters for POST /v1/chat/completions. Compatible with OpenAI, Anthropic, and OpenRouter SDKs.

Core Parameters

ParameterTypeDefaultRangeDescription
modelstringModel ID to use (e.g. deepseek-v3.2, mistral-7b).
messagesarrayArray of message objects with role and content fields.
temperaturefloat0.70 – 2Controls randomness. Lower values make output more deterministic; higher values more creative.
max_tokensinteger2561 – 131072Maximum number of tokens to generate in the response.
top_pfloat1.00 – 1Nucleus sampling: only considers tokens with cumulative probability above this threshold. Use either temperature or top_p, not both.
stopstring | string[]nullmax 4Up to 4 sequences where the model will stop generating further tokens.
streambooleanfalseWhether to stream back partial progress as server-sent events.

Penalty Parameters

These parameters control repetition and diversity in the generated text.

ParameterTypeDefaultRangeDescription
frequency_penaltyfloat0-2 – 2Penalize tokens proportionally to how often they appear. Positive values reduce repetition.
presence_penaltyfloat0-2 – 2Penalize tokens that have appeared at all. Encourages the model to talk about new topics.
repeat_penaltyfloat1.10 – 3Multiplicative penalty applied to repeated token sequences. 1.0 means no penalty.

Advanced Sampling

Fine-grained control over the token prediction process. These are particularly useful for research and advanced use cases.

ParameterTypeDefaultRangeDescription
top_kinteger00 – 500Only sample from the top K most likely tokens. 0 disables top-k filtering.
min_pfloat0.050 – 1Minimum probability threshold relative to the most likely token. Tokens below this are excluded.
typical_pfloat1.00 – 1Locally typical sampling. 1.0 disables it. Lower values make output more predictable.
tfs_zfloat1.00 – 1Tail-free sampling parameter. 1.0 disables it. Lower values cut off the tail of the distribution.
mirostat_modeinteger00, 1, 2Mirostat sampling mode. 0 = disabled, 1 = Mirostat v1, 2 = Mirostat v2.
mirostat_taufloat5.00 – 10Target entropy (perplexity) for Mirostat. Lower = more focused output.
mirostat_etafloat0.10 – 1Mirostat learning rate. Controls how quickly the algorithm adapts.
seedintegerrandom0 – 2^31Random seed for reproducible outputs. Same seed + same params = same output.
ninteger11 – 5Number of chat completions to generate for each input.

Example

python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.oxlo.ai/v1",
    api_key="YOUR_API_KEY"
)

response = client.chat.completions.create(
    model="deepseek-v3.2",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Explain quantum computing in simple terms."}
    ],
    temperature=0.9,
    max_tokens=1024,
    top_p=0.95,
    frequency_penalty=0.5,
    presence_penalty=0.3,
    stop=["\n\n"],
    seed=42
)

print(response.choices[0].message.content)

Compatibility: Our API is fully compatible with the OpenAI SDK. If you are using OpenAI, Anthropic, or OpenRouter, you can switch to Oxlo by just changing the base_url and api_key.


Image Generation

Parameters for POST /v1/images/generations.

ParameterTypeDefaultRangeDescription
promptstringText description of the image to generate.
modelstring""Model to use (e.g. oxlo-image-pro, sdxl, stable-diffusion-1.5).
num_inference_stepsinteger41 – 150Number of denoising steps. More steps generally produce better quality but take longer.
guidance_scalefloat7.51 – 30Classifier-free guidance scale. Higher values make the image follow the prompt more closely.
negative_promptstring""free textText describing what to avoid in the generated image.
widthinteger1024256 – 2048Image width in pixels. Must be a multiple of 64.
heightinteger1024256 – 2048Image height in pixels. Must be a multiple of 64.
seedintegerrandom0 – 2^31Random seed for reproducible generations.
ninteger11 – 4Number of images to generate.

Example

python
response = client.images.generate(
    model="oxlo-image-pro",
    prompt="A futuristic city skyline at sunset, cyberpunk style",
    negative_prompt="blurry, low quality",
    n=1,
    size="1024x1024"
)

image_b64 = response.data[0].b64_json

Audio: Speech-to-Text

Parameters for POST /v1/audio/transcriptions (Whisper models).

ParameterTypeDefaultRangeDescription
filefileAudio file to transcribe. Supports mp3, mp4, wav, webm, m4a, mpeg, mpga.
modelstringwhisper-mediumWhisper model to use (whisper-medium, whisper-large, whisper-large-v3).
languagestringautoISO 639-1Language of the audio. Auto-detected if not specified.
response_formatstringjsonjson, text, verbose_json, srt, vttOutput format for the transcription.
temperaturefloat00 – 1Sampling temperature for the decoding process. 0 is most deterministic.

Example

python
transcript = client.audio.transcriptions.create(
    model="whisper-large-v3",
    file=open("meeting.mp3", "rb"),
    language="en",
    response_format="verbose_json"
)

print(transcript.text)

Audio: Text-to-Speech

Parameters for POST /v1/audio/speech (Kokoro TTS).

ParameterTypeDefaultRangeDescription
inputstringText to convert to speech.
modelstringkokoro-82mTTS model to use.
voicestringaf_heartmodel voicesVoice to use for synthesis. Available voices can be fetched via /v1/audio/voices.
speedfloat1.00.25 – 4.0Playback speed multiplier.

Example

python
response = client.audio.speech.create(
    model="kokoro-82m",
    input="Hello, welcome to Oxlo AI.",
    voice="af_heart",
    speed=1.0
)

with open("output.wav", "wb") as f:
    f.write(response.content)

Object Detection

Parameters for POST /v1/detect (YOLO models).

ParameterTypeDefaultRangeDescription
imagestringBase64-encoded image or image URL.
modelstringyolo11x.ptYOLO model variant to use.
confidencefloat0.250.01 – 1.0Minimum confidence threshold. Only detections above this score are returned.
iou_thresholdfloat0.450.1 – 1.0Intersection-over-Union threshold for non-maximum suppression.
classesstringallcomma-separatedComma-separated list of class names or IDs to filter.
max_detectionsinteger1001 – 300Maximum number of detections to return.
image_sizeinteger640320 – 1280Input image size for inference. Larger = slower but more accurate.

Example

python
import requests, base64

with open("photo.jpg", "rb") as f:
    image_b64 = base64.b64encode(f.read()).decode()

response = requests.post(
    "https://api.oxlo.ai/v1/detect",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "image": image_b64,
        "model": "yolo11x.pt",
        "confidence": 0.3,
        "iou_threshold": 0.5
    }
)

for det in response.json()["detections"]:
    print(f"{det['class_name']}: {det['confidence']:.2f}")

Embeddings

Parameters for POST /v1/embeddings.

ParameterTypeDefaultRangeDescription
inputstring | string[]Text or array of texts to embed.
modelstringbge-largeEmbedding model to use (bge-large, e5-large).
encoding_formatstringfloatfloat, base64Format of the output embeddings.

Example

python
response = client.embeddings.create(
    model="bge-large",
    input=["Search query here", "Document text here"]
)

for item in response.data:
    print(f"Embedding dim: {len(item.embedding)}")

Parameter Discovery API

You can dynamically discover which parameters a model supports via our API. This is useful for building UIs that adapt to different model types automatically.

GEThttps://api.oxlo.ai/v1/models/{model_id}/parameters

Response Format

json
{
  "model_id": "deepseek-v3.2",
  "model_name": "DeepSeek V3.2",
  "category": "chat",
  "context_length": 128000,
  "parameters": {
    "temperature": {
      "type": "float",
      "min": 0,
      "max": 2,
      "default": 0.7,
      "step": 0.1,
      "section": "basic",
      "description": "Controls randomness in output generation"
    },
    "top_k": {
      "type": "int",
      "min": 0,
      "max": 500,
      "default": 0,
      "section": "advanced",
      "description": "Only sample from top K tokens (0 = disabled)"
    }
  }
}

Note: Parameters are grouped intobasic and advanced sections. The basic section contains the most commonly used parameters, while advanced contains fine-tuning options for power users.

Need a parameter we don't support yet? Reach out to us at hello@oxlo.ai with details on the parameter and your use case. We actively review requests and add new parameters regularly.