Cohere v5, GPT-6.2, Mistral Large 4, and Qwen4 Max Added
Date: 2026-11-18 / (1405-08-27)
Summary
Ten models are now available on AvalAI: five Cohere retrieval and parsing models, OpenAI's GPT-6.2 Astra, GPT-6.2 Sol and GPT Transcribe, Mistral Large 4, and Alibaba's Qwen4 Max. This release covers their intended uses, exact AvalAI prices, supported integration routes, and request/response examples.
Details
Cohere: Rerank v5, Embed v5, and Parse v5
Use cohere-rerank-v5-pro and cohere-rerank-v5-fast to order candidate documents by relevance to a query. Pro is the higher-cost option for relevance-sensitive retrieval; Fast provides a lower input-token rate for frequent ranking. Cohere's Rerank 5 announcement describes calibrated relevance scores and an optional Context Focus feature. Start with the common query/document format below; optional provider fields need their own forwarding check.
Use cohere-embed-v5-pro for document indexing and cohere-embed-v5-fast for query embedding or lower-cost embedding workloads. Cohere documents text, image, and mixed inputs, a 128K-token context, and 2,048-dimensional default vectors in its Embed 5 announcement. Pro and Fast share an embedding space: document vectors from Pro can be searched with query vectors from Fast when the vector dimensions and retrieval configuration match. The runnable AvalAI example below uses text; multimodal inputs and optional dimension controls are separate from that baseline.
Use cohere-parse-v5 to extract document text and layout into Markdown, tables, and image blocks. Cohere's Parse announcement identifies nine supported languages: Arabic, English, French, German, Japanese, Korean, Italian, Portuguese, and Spanish. Persian is not listed as a supported language; evaluate your own documents before relying on its accuracy.
The focused Parse API currently accepts image URLs or image data URIs. For a PDF workflow, render its pages to supported images and process them individually. Do not copy Mistral's PDF upload, annotation, or response assumptions into a Cohere Parse request merely because both use the OCR route. See Cohere, Embeddings, Rerank, and OCR.
OpenAI: GPT-6.2 Astra, GPT-6.2 Sol, and GPT Transcribe
OpenAI positions gpt-6.2-astra for demanding software engineering, computer, and document projects, and gpt-6.2-sol for everyday coding and agents at scale. Both accept text and image input and generate text. Their shared context is 1,050,000 tokens; AvalAI's current catalog lists 922,000 input tokens and 128,000 output tokens as the individual ceilings. Input and output share that context.
Use Chat Completions for a messages conversation or Responses for typed output items and application-managed agent workflows. AvalAI's current GPT-6.2 route list contains these two interfaces. OpenAI's upstream model guides do not support disabled reasoning; an output budget includes reasoning tokens as well as visible text. Validate the returned finish status before treating an answer as complete.
Use gpt-transcribe to turn recorded audio into text. It is billed by audio duration, with the file-based /v1/audio/transcriptions example below. The current catalog also lists /v1/realtime/transcription_sessions; consult the Audio reference for the distinction between that catalog route and OpenAI's other Realtime protocols. A file-transcription example does not establish a session-creation schema.
Read the OpenAI provider page, the Chat Completions reference, and the Responses reference. Official model guidance is available for Astra, Sol, and GPT Transcribe.
Mistral AI: Mistral Large 4
Use mistral-large-4-latest for chat, reasoning, and document-oriented workflows. Mistral's Large 4 model documentation describes text/image input, a 1-million-token context, function calling, and structured output. These describe the upstream model; AvalAI's basic Chat Completions route is the integration shown here.
Keep the exact AvalAI request ID mistral-large-4-latest. Other Mistral model names and aliases in the upstream guide are not interchangeable AvalAI IDs, and a latest name does not provide a dated version pin. See Mistral AI for model-specific integration guidance.
Alibaba: Qwen4 Max
Use qwen4-max for programming, office work, front-end design, and complex agent workflows. Alibaba's Qwen4-Max documentation describes a flagship multimodal model with image/video understanding, reasoning, tool calls, and structured output. AvalAI's current catalog lists 991,808 input tokens and 131,072 output tokens, together with vision, video input, reasoning, function calling, structured output, and prompt caching.
Use the Chat Completions example below for this AvalAI route. The Qwen sample explicitly disables thinking to request an ordinary text reply. Upstream compatibility descriptions do not establish Responses or Messages support through every AvalAI provider route. See Alibaba for current route and cache guidance; optional upstream cache lifetimes do not change the AvalAI rates supplied here.
AvalAI models and integration routes
| Exact AvalAI ID | Minimum tier | Baseline route |
|---|---|---|
cohere-rerank-v5-pro | 0 | /v1/rerank |
cohere-rerank-v5-fast | 0 | /v1/rerank |
cohere-embed-v5-pro | 0 | /v1/embeddings |
cohere-embed-v5-fast | 0 | /v1/embeddings |
cohere-parse-v5 | 0 | /v1/ocr |
gpt-transcribe | 0 | /v1/audio/transcriptions |
gpt-6.2-astra | 1 | /v1/chat/completions, /v1/responses |
gpt-6.2-sol | 0 | /v1/chat/completions, /v1/responses |
mistral-large-4-latest | 0 | /v1/chat/completions |
qwen4-max | 1 | /v1/chat/completions |
Rate limits depend on your account tier. Use the exact model's rate-limit and availability record when planning concurrency.
Pricing
These are AvalAI prices in USD, from the current catalog and the release's supplied rates. Token tables use 1 million tokens as their unit. A cache-read price applies to reported cache hits; a cache-creation price applies to its own input category. Apply each input token's relevant category once and check any separately billed tool usage against current pricing.
Cohere token pricing
| Model | Text input / 1M tokens | Image input / 1M image tokens | Output / 1M tokens |
|---|---|---|---|
cohere-rerank-v5-pro | $0.05 | — | $0.00 |
cohere-rerank-v5-fast | $0.02 | — | $0.00 |
cohere-embed-v5-pro | $0.12 | $0.40 | $0.00 |
cohere-embed-v5-fast | $0.08 | $0.40 | $0.00 |
Rerank v5 uses input-token billing, replacing the search-unit pricing associated with older Rerank generations. Relevance scores and vectors are not a generated chat reply. Zero output rates do not remove the input charge; the embedding image rate is per million image tokens, not per image.
OpenAI text pricing
| Model | Request input tokens | Input | Cached input | Cache creation input | Output |
|---|---|---|---|---|---|
gpt-6.2-astra | Up to 272,000 | $8.00 | $0.40 | $10.00 | $40.00 |
gpt-6.2-astra | Above 272,000 | $16.00 | $0.80 | $20.00 | $60.00 |
gpt-6.2-sol | Up to 272,000 | $2.00 | $0.10 | $2.50 | $10.00 |
gpt-6.2-sol | Above 272,000 | $4.00 | $0.20 | $5.00 | $15.00 |
All four rate columns are USD per 1 million tokens. When the request exceeds 272,000 input tokens, the higher row applies to the entire request, including output, not just tokens above the threshold. Exactly 272,000 input tokens use the lower row. The higher band doubles input and cache rates and multiplies output rates by 1.5. Reasoning tokens are billable output.
Mistral AI and Alibaba text pricing
| Model | Input | Cached input | Cache creation input | Output |
|---|---|---|---|---|
mistral-large-4-latest | $0.70 | $0.07 | — | $2.10 |
qwen4-max | $1.50 | $0.075 | $1.875 | $4.50 |
Rates are USD per 1 million tokens. Cache prices do not guarantee that a repeated request will hit a cache or establish a particular cache lifetime.
Document and audio pricing
| Model | Billing unit | AvalAI rate |
|---|---|---|
cohere-parse-v5 | Processed page | $0.0015 |
gpt-transcribe | Audio input second | $0.000075 |
GPT Transcribe therefore costs $0.0045 per minute at this rate. Its zero text-input, audio-token, cached-input, and output-token entries do not make transcription free: audio duration is the billable quantity. Parse's page charge is separate from any later embedding, reranking, or language-model request.
API request and response examples
Set AVALAI_API_KEY in a server-side environment. The curl commands make one attempt, with explicit connection and request deadlines. The file-transcription example also needs a valid local meeting.wav.
The responses below are illustrative, not live AvalAI captures. Text, identifiers, usage counts, and relevance scores are examples. Each endpoint has its own envelope; read its documented answer fields and returned usage rather than parsing every service as a chat completion. The embedding example explicitly previews the vector through jq.
Chat Completions: Sol, Astra, or Mistral Large 4
This request uses gpt-6.2-sol. Change only model to gpt-6.2-astra or mistral-large-4-latest for the same basic text-conversation format. Read the assistant reply from choices[0].message.content and check finish_reason; choose a model-supported output budget for production requests.
curl --silent --show-error --fail-with-body \
--connect-timeout 10 --max-time 120 --retry 0 \
https://api.avalai.ir/v1/chat/completions \
-H "Authorization: Bearer $AVALAI_API_KEY" \
-H 'Content-Type: application/json' \
--data-binary '{
"model": "gpt-6.2-sol",
"messages": [{"role": "user", "content": "Summarize this note in one sentence: Keep model identifiers unchanged when adjusting rate limits."}]
}'import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["AVALAI_API_KEY"],
base_url="https://api.avalai.ir/v1",
timeout=120.0,
max_retries=0,
)
completion = client.chat.completions.create(
model="gpt-6.2-sol",
messages=[
{
"role": "user",
"content": "Summarize this note in one sentence: Keep model identifiers unchanged when adjusting rate limits.",
}
],
)
print(completion.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.AVALAI_API_KEY,
baseURL: "https://api.avalai.ir/v1",
timeout: 120_000,
maxRetries: 0,
});
const completion = await client.chat.completions.create({
model: "gpt-6.2-sol",
messages: [{
role: "user",
content: "Summarize this note in one sentence: Keep model identifiers unchanged when adjusting rate limits.",
}],
});
console.log(completion.choices[0].message.content);{
"id": "chatcmpl-example",
"object": "chat.completion",
"created": 1795006800,
"model": "gpt-6.2-sol",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Adjust rate limits while preserving the exact model identifier."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 28,
"completion_tokens": 80,
"total_tokens": 108,
"prompt_tokens_details": {
"cached_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 64
}
}
}Chat Completions: Qwen4 Max
This Qwen-specific request sets enable_thinking: false and a 256-token completion budget for an ordinary text reply. It does not change the default thinking behavior of other requests or other models.
curl --silent --show-error --fail-with-body \
--connect-timeout 10 --max-time 120 --retry 0 \
https://api.avalai.ir/v1/chat/completions \
-H "Authorization: Bearer $AVALAI_API_KEY" \
-H 'Content-Type: application/json' \
--data-binary '{
"model": "qwen4-max",
"messages": [{"role": "user", "content": "Suggest one practical improvement to an API documentation homepage."}],
"enable_thinking": false,
"max_completion_tokens": 256
}'{
"id": "chatcmpl-qwen-example",
"object": "chat.completion",
"created": 1795006800,
"model": "qwen4-max",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Put one runnable first-request example beside the quickstart link."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 18,
"completion_tokens": 14,
"total_tokens": 32
}
}Responses: GPT-6.2 Sol or Astra
This request uses Sol; change only model to gpt-6.2-astra for Astra. Check status and the typed output items. Text is in output[].content[] entries of type output_text; SDKs offer response.output_text as a convenience accessor. An output ceiling includes reasoning, so an incomplete response may contain less visible text than expected.
curl --silent --show-error --fail-with-body \
--connect-timeout 10 --max-time 120 --retry 0 \
https://api.avalai.ir/v1/responses \
-H "Authorization: Bearer $AVALAI_API_KEY" \
-H 'Content-Type: application/json' \
--data-binary '{
"model": "gpt-6.2-sol",
"input": "Explain why clear API error messages help developers.",
"max_output_tokens": 2048,
"store": false
}'{
"id": "resp-example",
"object": "response",
"created_at": 1795006800,
"status": "completed",
"error": null,
"incomplete_details": null,
"model": "gpt-6.2-sol",
"output": [
{
"id": "msg-example",
"type": "message",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Clear errors show developers what failed and what to change, reducing debugging time.",
"annotations": []
}
]
}
],
"usage": {
"input_tokens": 16,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 40,
"output_tokens_details": {
"reasoning_tokens": 24
},
"total_tokens": 56
}
}Embeddings: Pro indexing or Fast queries
This request embeds one text document with Pro. Use cohere-embed-v5-fast for the corresponding query model or a lower-cost embedding workload.
The jq filter produces a display projection: it adds the display-only embedding_dimensions field and retains only the first four numbers. The illustrative JSON below is that projected output. The API's default vector has 2,048 values; keep the original complete vector when storing or comparing embeddings. embedding_dimensions is added by this example, not returned by the API.
curl --silent --show-error --fail-with-body \
--connect-timeout 10 --max-time 120 --retry 0 \
https://api.avalai.ir/v1/embeddings \
-H "Authorization: Bearer $AVALAI_API_KEY" \
-H 'Content-Type: application/json' \
--data-binary '{
"model": "cohere-embed-v5-pro",
"input": ["A document about retrieval."]
}' \
| jq '.data |= map(. + {embedding_dimensions: (.embedding | length)} | .embedding = .embedding[:4])'{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [
0.012,
-0.004,
0.008,
0.019
],
"embedding_dimensions": 2048
}
],
"model": "cohere-embed-v5-pro",
"usage": {
"prompt_tokens": 6,
"total_tokens": 6
}
}Rerank: Pro or Fast
This request ranks two candidate documents with Pro; change only model to cohere-rerank-v5-fast for Fast. Result index points to the original document array, and relevance_score expresses its relationship to the query. It does not authorize a downstream action or prove the document is correct.
This endpoint returns id, results, and meta, rather than a Chat Completions envelope. An empty meta.billed_units object does not mean zero input tokens or a free request; use the actual account usage and applicable AvalAI rates for reconciliation.
curl --silent --show-error --fail-with-body \
--connect-timeout 10 --max-time 120 --retry 0 \
https://api.avalai.ir/v1/rerank \
-H "Authorization: Bearer $AVALAI_API_KEY" \
-H 'Content-Type: application/json' \
--data-binary '{
"model": "cohere-rerank-v5-pro",
"query": "Which document explains retrieval?",
"documents": ["A guide to document retrieval.", "A guide to image editing."],
"top_n": 2
}'{
"id": "example-rerank-id",
"results": [
{
"index": 0,
"relevance_score": 0.92
},
{
"index": 1,
"relevance_score": 0.08
}
],
"meta": {
"api_version": {
"version": "2"
},
"billed_units": {}
}
}Cohere Parse: one image page
Save a valid PNG page as invoice.png. base64 encodes the local file and passes it to jq through standard input; jq builds the data URI and JSON body. The request selects Markdown output.
Read each normalized page's markdown string and usage_info.pages_processed. This is AvalAI's OCR envelope, not Cohere's native nested Markdown object. PDF and Mistral-specific annotation fields are not part of this image-page example.
base64 <invoice.png | tr -d '\r\n' | jq -Rs '{
model: "cohere-parse-v5",
document: {type: "image_url", image_url: ("data:image/png;base64," + .)},
output_format: "markdown"
}' \
| curl --silent --show-error --fail-with-body \
--connect-timeout 10 --max-time 120 --retry 0 \
https://api.avalai.ir/v1/ocr \
-H "Authorization: Bearer $AVALAI_API_KEY" \
-H 'Content-Type: application/json' \
--data-binary @-{
"object": "ocr",
"model": "cohere-parse-v5",
"pages": [
{
"index": 0,
"markdown": "# Invoice\n\nInvoice number: INV-1001\nTotal: USD 25.00",
"images": null
}
],
"usage_info": {
"pages_processed": 1
}
}GPT Transcribe: an audio file
Save a valid audio recording as meeting.wav. Curl supplies the multipart boundary automatically, so this request sets only the authorization header. Use response_format=json for GPT Transcribe; do not inherit other output formats or optional hints from older transcription models.
Read text from the JSON response. Audio duration determines the price; token-rate entries or the length of the transcript do not replace the audio-second billing unit.
curl --silent --show-error --fail-with-body \
--connect-timeout 10 --max-time 120 --retry 0 \
https://api.avalai.ir/v1/audio/transcriptions \
-H "Authorization: Bearer $AVALAI_API_KEY" \
-F 'model=gpt-transcribe' \
-F 'file=@meeting.wav' \
-F 'response_format=json'{
"text": "Bonjour, pouvez-vous m'entendre ?"
}Choosing a workflow
For a retrieval application, Parse can prepare supported image pages, Embed can build the document and query vectors, and Rerank can order the retrieved candidates before a chat model writes an answer. Those are separate requests with separate page, input-token, and output-token charges. Keep document permissions and source references with each chunk, and evaluate the Pro/Fast combination on representative retrieval questions before a large indexing job.
Use Astra for demanding work when its higher rate is justified by your task evaluation; Sol, Mistral Large 4, and Qwen4 Max offer other text-generation options with different provider constraints and prices. Use GPT Transcribe for audio-to-text input, then select a language model only if your application also needs summarization or further analysis.
Documentation
- Cohere models and API guidance
- OpenAI models and audio guidance
- Mistral AI models
- Alibaba models
- Current pricing and model comparison
- Manual RAG with Embeddings
- Error handling: inspect the response body and retain the
avalai-request-idheader when investigating a failed request.