OpenAI Style
Use endpoints compatible with the OpenAI API
SilentAPI provides endpoints compatible with the OpenAI API. If your codebase uses the OpenAI SDK, change the base URL and API key. Request and response shapes follow the OpenAI API.
Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /v1/chat/completions | Chat completions |
| POST | /v1/completions | Legacy text completions |
| POST | /v1/responses | Responses API |
| POST | /v1/embeddings | Create embeddings |
| POST | /v1/audio/speech | Text to speech |
| POST | /v1/audio/transcriptions | Speech to text |
| POST | /v1/images/generations | Image generation |
| POST | /v1/images/edits | Image edits |
| GET | /v1/models | List available models |
| GET | /v1/models/{id} | Get one model |
Chat Completions
Send an OpenAI Chat Completions API request with the model and messages fields:
curl https://api.silentapi.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gpt-6-sol",
"messages": [{"role":"user","content":"Explain how APIs work."}]
}'
Response:
{
"id": "chatcmpl_1719584000",
"object": "chat.completion",
"created": 1719584000,
"model": "gpt-6-sol",
"choices": [{
"index": 0,
"message": {
"role": "assistant",
"content": "An API is like a waiter in a restaurant..."
},
"finish_reason": "stop"
}],
"usage": {
"prompt_tokens": 8,
"completion_tokens": 156,
"total_tokens": 164
},
"silentapi": {
"cost": 0.000117,
"fallback": null
}
}
Using the OpenAI SDK
Python
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.silentapi.com/v1"
)
response = client.chat.completions.create(
model="gpt-6-sol",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
]
)
Send conversation messages in messages. Send system instructions as a message with role: "system". Use prompt only with the Completions API.
Embeddings
Send text in the input field. Use gemini-embedding-2 or text-embedding-3-small.
curl https://api.silentapi.com/v1/embeddings \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"model":"gemini-embedding-2","input":"SilentAPI API documentation"}'
encoding_format: "base64" works on every model. dimensions is sent to models that support it. See Embeddings in Parameter Handling.
Text to Speech
Send text in the input field. The response is audio.
curl https://api.silentapi.com/v1/audio/speech \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"model":"gemini-3.8-flash-tts","input":"Your request is ready.","voice":"Kore","response_format":"wav"}' \
-o speech.wav
Every speech model accepts mp3, wav, opus, aac, flac, and pcm. When a model cannot make the requested format, you get the closest format it supports. The X-SilentAPI-Format header shows the real format. See Speech in Parameter Handling.
Speech to Text
Send an audio file in the multipart file field. Use gpt-transcribe.
curl https://api.silentapi.com/v1/audio/transcriptions \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@recording.mp3" \
-F "model=gpt-transcribe"
response_format can be json, text, verbose_json, srt, or vtt on every model. See Transcription in Parameter Handling.
Current Models
Use gpt-6.1-sol for balanced work. These GPT models are available:
| Model | Reasoning levels |
|---|---|
| gpt-6.1-sol | low, medium, high, xhigh, max |
| gpt-6-astra | low, medium, high, xhigh, max |
| gpt-6-sol | none, low, medium, high, xhigh, max |
| gpt-6-luna | none, low, medium, high, xhigh, max |
Read [ Services ] or the model list for the current models and levels.
gpt-6.1-sol supports function calling. Send function definitions in tools. Your application runs the functions requested by the model.
Supported Parameters
| Parameter | Type | Description |
|---|---|---|
| model | string | The model ID (see Services) |
| messages | array | Multi-turn conversation messages |
| temperature | number | Sampling temperature (0 to 2) |
| max_tokens | integer | Maximum output tokens |
| max_completion_tokens | integer | Maximum completion tokens (GPT 6 and GPT 5.6 models) |
| top_p | number | Nucleus sampling parameter |
| reasoning_effort | string | Reasoning level: none, minimal, low, medium, high, xhigh, or max. See Reasoning. |
| response_format | object | JSON Schema or JSON object mode |
| tools | array | Function calling tool definitions |
| stream | boolean | Enable SSE streaming (see Streaming) |
| webhook_url | string | Receive the response payload as a POST callback |
Parameter Handling
Some values are valid in the OpenAI API but not on every model. SilentAPI changes them so the request does not fail:
| Parameter | Handling |
|---|---|
| temperature | Limited to 0 to 2 |
| top_p, min_p | Limited to 0 to 1 |
| frequency_penalty, presence_penalty | Limited to -2 to 2 |
| repetition_penalty | Limited to 0 to 2 |
| max_tokens, max_completion_tokens | A decimal value becomes the whole number below it. A value below 1 is ignored. |
| Numbers sent as text | Changed to numbers, for example "0.5" becomes 0.5. A value that is not a number is ignored. |
| reasoning_effort, reasoning.effort | Changed to the closest level the model supports. See Reasoning. |
For media endpoints, see Parameter Handling in Media and OCR.
Reasoning
Chat models accept a reasoning level. The field depends on the endpoint:
| Endpoint | Field |
|---|---|
| Chat Completions API | reasoning_effort |
| Responses API | reasoning.effort |
Native model routes, such as /v1/google/gemini-3.8-flash | reasoning_effort, or the alias thinkingLevel |
| Anthropic Messages API | thinking. See Anthropic Style. |
Gemini generateContent | generationConfig.thinkingConfig. See Gemini Style. |
curl https://api.silentapi.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gpt-6.1-sol",
"messages": [{"role":"user","content":"Plan a three-step database migration."}],
"reasoning_effort": "high"
}'
| Value | Label |
|---|---|
| none | None. Off on models that support only on or off. |
| minimal | Minimal |
| low | Low |
| medium | Medium |
| high | High |
| xhigh | Extra High |
| max | Max |
| on | On. Used by models that support only on or off. |
Each model supports its own set of levels. Read them in silentapi.reasoning in the model list. SilentAPI changes the request to fit the model:
| Model levels | Result |
|---|---|
A list of levels, for example ["low", "medium", "high"] | SilentAPI uses the requested level when the model supports it. Otherwise it uses the closest supported level. When two levels are equally close, it uses the higher level. |
["none", "on"] | The model accepts only on or off. none turns reasoning off. Any other level turns it on. |
[] | The model always reasons. SilentAPI ignores the requested level. |
| Model levels | Request | Level used |
|---|---|---|
["low", "medium", "high"] | xhigh | high |
["low", "medium", "high"] | none | low |
["none", "on"] | high | On |
[] | low | The model default |
SilentAPI also accepts these aliases:
| Request value | Same as |
|---|---|
| on, enabled, true | on. On a model with a list of levels, SilentAPI uses medium or the closest supported level. |
| off, disabled, false | none |
SilentAPI ignores a value that is not in these tables. The model then uses its default.
Chat Completions also accepts a reasoning object. SilentAPI reads it when reasoning_effort is absent:
| Field | Handling |
|---|---|
| reasoning.effort | Same as reasoning_effort |
| reasoning.max_tokens | A token budget. SilentAPI changes it to a level with the budget table, then to the closest level the model supports. |
| reasoning.enabled | true is the same as on. false is the same as none. |
A model that cannot turn reasoning off gets its lowest level for none. A model that always reasons with a fixed level gets no reasoning fields. Other fields in reasoning, such as exclude, are kept.
Image Generation
curl https://api.silentapi.com/v1/images/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gpt-image-2.5-flare",
"prompt": "A serene mountain landscape at sunset",
"n": 1,
"size": "1024x1024"
}'
SilentAPI changes size, aspect_ratio, n, response_format, and output_format to fit each image model. See Image Generation in Parameter Handling.
Video
Video generation runs as a job. Create the job. Poll its status until it completes. Download the MP4 file.
| Method | Path | Description |
|---|---|---|
| POST | /v1/videos | Create a video job |
| GET | /v1/videos/{id} | Get the job status |
| GET | /v1/videos/{id}/content | Download the finished video (MP4) |
curl https://api.silentapi.com/v1/videos \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "minimax-h3-max",
"prompt": "A paper boat drifting down a rainy street",
"duration": 6,
"resolution": "768p",
"aspect_ratio": "16:9"
}'
The API returns 202 Accepted:
{
"id": "video_abc123",
"status": "processing",
"status_url": "/v1/videos/video_abc123"
}
Poll the status until the job is done:
curl https://api.silentapi.com/v1/videos/video_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"
Download the video:
curl https://api.silentapi.com/v1/videos/video_abc123/content \
-H "Authorization: Bearer YOUR_API_KEY" \
-o video.mp4
Model Discovery
GET /public/models lists every model in the OpenAI list format. It needs no API key. Use it in tools and apps that read a model list. Browser apps can call it from any origin.
curl https://api.silentapi.com/public/models
GET /v1/models returns the same list. It needs an API key. GET /v1/models/{id} returns one item.
curl https://api.silentapi.com/v1/models \
-H "Authorization: Bearer YOUR_API_KEY"
The response is {"object": "list", "data": [...]}. Example item. Prices are examples:
{
"id": "gemini-3.8-flash",
"object": "model",
"created": 1790000000,
"owned_by": "silentapi",
"name": "Gemini 3.8 Flash",
"display_name": "Gemini 3.8 Flash",
"context_length": 1048576,
"max_output_tokens": 65536,
"input_modalities": ["text", "image", "video", "file", "audio"],
"output_modalities": ["text"],
"pricing": {
"prompt": "9.38e-7",
"completion": "0.00000469",
"input_cache_read": "9.38e-8"
},
"silentapi": {
"model_name": "Gemini 3.8 Flash",
"vendor": "Google AI",
"family": "Gemini",
"category": "multimodal",
"resilient": true,
"privacy": "e2e",
"privacy_label": "End-to-end ZDR",
"reasoning": ["low", "medium", "high"]
}
}
| Field | Type | Meaning |
|---|---|---|
| id | string | Model ID. Send it in the model field. |
| object | string | Always model |
| created | integer | Unix time in seconds |
| owned_by | string | Always silentapi |
| name | string | Model name |
| display_name | string | Model name. Same as name. |
| context_length | integer or null | Maximum context in tokens |
| max_output_tokens | integer or null | Maximum output tokens |
| input_modalities | array | Input types, for example text or image |
| output_modalities | array | Output types |
| pricing | object | Token prices. Absent when the model has no token prices. |
| silentapi | object | SilentAPI model details |
pricing has these fields. Each price is in USD per token, as a string. A price can use exponent notation, for example 9.38e-7.
| Field | Type | Meaning |
|---|---|---|
| prompt | string | Price of one input token |
| completion | string | Price of one output token |
| input_cache_read | string | Price of one cached input token. Only when it applies. |
| input_cache_write | string | Price of one cache write token. Only when it applies. |
silentapi has these fields:
| Field | Type | Meaning |
|---|---|---|
| model_name | string | Model name |
| vendor | string | Model vendor |
| family | string | Model family |
| category | string | Service type, for example multimodal, text, image, or embedding |
| privacy | string | e2e or silentapi |
| privacy_label | string | End-to-end ZDR or SilentAPI protected. See Privacy Labels. |
| resilient | boolean | true when fallback models exist |
| reasoning | array | Supported reasoning levels. Chat models only. See Reasoning. |
Cross-Style Usage
Use any supported text or multimodal model with the OpenAI Chat Completions API. For example, gemini-3.8-flash returns the OpenAI response format.
Use the separate media endpoints for embeddings, images, speech, and video.