Request formats
- Client base URL
https://platform-api.invideo.io- Auth header
x-api-key: $INVIDEO_API_KEY- HTTP endpoint
POST https://platform-api.invideo.io/v1/messages- Model field
model · gemini-3-8-flash
curl https://platform-api.invideo.io/v1/messages \
-H "x-api-key: $INVIDEO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3-8-flash",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Explain why the sky looks blue in one sentence."
}
]
}'Response
Read the text blocks in content[] of the returned message.
usage.cost_usd. Streams report the exact charge in the final usage event. The settled USD charge is also in x-invideo-cost-usd when known before headers are sent.
{
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "Air scatters blue light more than red light."
}
],
"usage": {
"input_tokens": 10,
"output_tokens": 2,
"cost_usd": "0.000002",
"invideo_cost": {
"total_usd": "0.000002",
"lines": [
{
"item": "input_tokens",
"quantity": "10",
"unit_price_usd": "0.0000001",
"amount_usd": "0.000001"
},
{
"item": "output_tokens",
"quantity": "2",
"unit_price_usd": "0.0000005",
"amount_usd": "0.000001"
}
]
}
}
}Price
From $0.75 / 1M input tokens.
Reasoning tokens are charged at the output rate.
| Token type | Price per 1M tokens |
|---|---|
| Input | $0.75 |
| Audio input | $0.75 |
| Cached input | $0.075 |
| Cached audio input | $0.075 |
| Output | $3.75 |
Input
Use the input shape for the selected format. OpenAI Chat and Anthropic Messages use messages. OpenAI Responses uses input. Gemini uses contents.
Errors
Errors follow the selected format. For a 429 rate limit, wait for Retry-After before retrying. API errors
Model
| Model ID | gemini-3-8-flash |
| Context window | 1,048,576 tokens |
| Max output | 65,536 tokens |
| Features | tools, JSON output, images, PDFs, prompt cache, thinking, audio, video |
Capabilities
| Streaming | yes |
| Tools (function calling) | yes |
| Structured output (JSON schema) | yes |
| Images in messages | yes |
| Reasoning | yes |