Qwen: Qwen3.7 Plus
Qwen3.7 Plus è il modello Qwen di Alibaba per attività testuali e con immagini, con risposte testuali. Il profilo pubblicato combina un contesto di un milione di token, ragionamento, strumenti basati su funzioni e controlli degli output strutturati per assistenti e analisi documentale o visiva.
- Ailoot · Anthropic Messages
POST /v1/messagesqwen3.7-plus - Ailoot · OpenAI Responses
POST /v1/responsesqwen3.7-plus - Ailoot · OpenAI Chat
POST /v1/chat/completionsqwen3.7-plus - Ailoot Ultra · OpenAI Chat
POST /v1/chat/completionsqwen3.7-plus - Ailoot Ultra · Anthropic Messages
POST /v1/messagesqwen3.7-plus - Ailoot · Anthropic Messages
POST /v1/messagesqwen-plus - Ailoot · OpenAI Responses
POST /v1/responsesqwen-plus - Ailoot · OpenAI Chat
POST /v1/chat/completionsqwen-plus - Ailoot Ultra · OpenAI Chat
POST /v1/chat/completionsqwen/qwen3.7-plus - Ailoot Ultra · Anthropic Messages
POST /v1/messagesqwen/qwen3.7-plus
Informazioni sul modello
Questa descrizione illustra le funzionalità del modello. Gli input, gli output e le opzioni disponibili in Ailoot per il metodo selezionato sono elencati di seguito.
Qwen3.7 Plus è un modello della serie Qwen3.7 di Alibaba. Accetta testo e immagini e restituisce testo, combinando le capacità linguistiche della serie con input visivo. Il profilo pubblicato elenca una finestra di contesto di 1,000,000 token e fino a 131,072 token di completamento, con controlli di ragionamento, strumenti e output strutturati.
Combinare la domanda con le sue evidenze
Per una domanda documentale, fornire il materiale pertinente e identificare i passaggi o le sezioni che la risposta deve confrontare. Per un’attività visiva, fornire un’immagine leggibile e indicare l’oggetto, il testo o lo stato dell’interfaccia da esaminare. Uno screenshot può sostenere una domanda su un errore o un layout, mentre il risultato è una spiegazione testuale o un insieme di risultati estratti.
Etichettare più fonti affinché le osservazioni restino associate al materiale giusto. Un confronto può richiedere un risultato per criterio con il relativo identificatore della fonte. Un brief di estrazione può definire i campi da restituire e come debbano apparire le informazioni mancanti. Tenere disponibili le evidenze originali quando si esaminano risposte ambigue.
Ragionamento, strumenti e struttura dei risultati
I metadati di hosting elencano controlli del ragionamento, strumenti basati su funzioni e output strutturati. Specificare la profondità necessaria all’attività e definire le operazioni disponibili all’applicazione circostante. Il modello può proporre una chiamata a uno strumento, mentre l’applicazione restituisce l’osservazione effettiva. Usare tale osservazione come evidenza per il passaggio successivo.
Per un risultato destinato al software, definire la struttura richiesta e convalidare sia campi sia valori. Per una risposta leggibile da una persona, richiedere la conclusione seguita dalle evidenze rilevanti. Le stesse etichette delle fonti devono collegare la risposta concisa al materiale di lavoro più lungo.
Usare il contesto disponibile in modo mirato
Organizzare il materiale lungo intorno alla domanda attuale, lasciando spazio alla risposta. Conservare decisioni consolidate e dettagli pertinenti delle fonti eliminando ripetizioni che non cambiano più la risposta. Un artefatto finale utile è un risultato testuale verificabile rispetto alle immagini o ai passaggi forniti e trasferibile al passaggio applicativo successivo.
Caso pratico
Caso pratico
Esempio tecnico in inglese
Extract milestones with source references
Extract a milestone table from these labeled notes. Design D: prototype review on 12 July, owner Eva. Engineering E: implementation starts after prototype approval; finish date not committed. Support S: help draft due 15 July, owner Leo. Return milestone, owner, date or dependency and source label. Use 'not stated' rather than filling missing ownership or dates.Risultato atteso
A source-linked milestone table with explicit dates, dependencies and missing-value markers.Verificare il risultato
Engineering's uncommitted finish date and absent owner remain marked as not stated.Ailoot · Anthropic Messages POST /v1/messages qwen3.7-plus
qwen3.7-plusqwen3.7-plusqwen-plus
Introduzione
Qwen3.7 Plus è il modello Qwen di Alibaba per attività testuali e con immagini, con risposte testuali. Il profilo pubblicato combina un contesto di un milione di token, ragionamento, strumenti basati su funzioni e controlli degli output strutturati per assistenti e analisi documentale o visiva.
- Input accettati
- Testo · Immagini
- Risultati
- Testo
Disponibile in Ailoot · input e metodi
Ailoot · Anthropic Messages POST /v1/messages
- Tipi di input
text,image- Tipi di output
text- Contesto
- 991.808 tokens
- Output massimo
- 131.072 tokens
- Formato di output
- json o SSE
| Campo | Tipo | Requisito | Valori e limiti | Predefinito |
|---|---|---|---|---|
Campomodel | Tipostring | RequisitoObbligatorio | Valori e limiti qwen3.7-plus | Predefinito— |
Campomessages | Tipomessage[] | RequisitoObbligatorio | Valori e limiti Numero minimo di elementi: 1 | Predefinito— |
Campomessages[].role | Tipostring | RequisitoObbligatorio | Valori e limiti user, assistant | Predefinito— |
Campomessages[].content | Tipostring|content_block[] | RequisitoObbligatorio | Valori e limiti | Predefinito— |
Camposystem | Tipostring|content_block[] | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campomax_tokens | Tipointeger | RequisitoObbligatorio | Valori e limiti Minimo: 1 Il limite si applica a: Limite esatto del modello o della scheda selezionati | Predefinito— |
Campostream | Tipoboolean | RequisitoFacoltativo | Valori e limiti | Predefinitofalse |
Campotemperature | Tiponumber | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotop_p | Tiponumber | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campostop_sequences | Tipostring[] | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotools | Tipotool[] | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotools[].name | Tipostring | RequisitoFacoltativo | Valori e limiti Si applica quando: Strumento fornito | Predefinito— |
Campotools[].description | Tipostring | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campotools[].input_schema | TipoJSON_schema | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campotool_choice | Tipoobject | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campothinking.type | Tipostring | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campothinking.budget_tokens | Tipointeger | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campooutput_config.effort | Tipostring | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campometadata | Tipoobject | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campocache_control | Tipoobject | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Combinazioni di materiali in input
Testo · Testo UTF8
messages[].content o blocco type=text
Testo + immagine
{type:image,source:{type:base64,media_type,data}} o origine type=url
Parametri e ciclo di vita del metodo
| Parametro | Contratto |
|---|---|
Parametromaterial_types | Contrattotext, image |
Parametrorequired | Contrattomodel, messages, max_tokens |
Parametrooptional_controls | Contrattonull |
Parametrocontent_type | Contrattoapplication/json |
Parametrotext_file_material | ContrattoContenuto UTF-8 effettivo inserito come testo; ID di file/URLs richiedono supporto separato ed esatto |
Ciclo di vita: exact retained published method
Le strutture dei metodi e gli ID sono esatti; la capacità del fornitore è distinta dall’ammissione delle richieste.
Tariffe
Tariffe dei metodi Ailoot
POST /v1/messages- Input
- 0,0004 USD / 1K
- Output
- 0,0016 USD / 1K
- Lettura dalla cache
- 0,00004 USD / 1K
- Scrittura nella cache
- 0,0005 USD / 1K
- Scrittura nella cache, 5 min
- 0,0005 USD / 1K tokens
Prezzi per lunghezza della richiesta · Anthropic Messages
| Dimensione della richiesta, in token | Input | Output | Lettura dalla cache | Scrittura nella cache | Cache 5 min | Cache 1 ora |
|---|---|---|---|---|---|---|
| Dimensione della richiesta, in token(0; 256.000] | Input0,0004 USD | Output0,0016 USD | Lettura dalla cache0,00004 USD | Scrittura nella cache0,0005 USD | Cache 5 min0,0005 USD | Cache 1 oraTariffa base: — |
| Dimensione della richiesta, in token(256.000; ∞) | Input0,0012 USD | Output0,0048 USD | Lettura dalla cache≈0,00012 USD | Scrittura nella cache0,0015 USD | Cache 5 min0,0015 USD | Cache 1 oraTariffa base: — |
Tariffe in USD per 1K token. Se non è impostata alcuna tariffa, viene ereditata la tariffa base di questo metodo; «—» indica che non è impostata alcuna tariffa base.
Ailoot prenota un importo stimato prima di una richiesta. Dopo il risultato, addebita il costo finale in base all’utilizzo misurato. Per lo streaming, l’addebito usa il record finale di utilizzo. Come funzionano la prenotazione e l’addebito finale →
Dettagli della tariffa di riferimento
I listini di riferimento del modello non modificano la selezione del metodo, i preventivi o gli addebiti. Gli addebiti attivi usano le tariffe del metodo Ailoot selezionato.
Listini di riferimento del modello
Prezzi per configurazione
Associa ogni costo alle condizioni indicate. Usa una sola tariffa per ogni insieme di configurazioni alternative.
| Configurazione | Listino delle tariffe | Token di contesto, più di | Token di contesto, fino al limite incluso | Costo |
|---|---|---|---|---|
| ConfigurazioneOpenAI Chat · Tariffe base per token | Listino delle tariffeTariffa base | Token di contesto, più di— | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneOpenAI Chat · Fascia 1 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di0 | Token di contesto, fino al limite incluso256.000 | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneOpenAI Chat · Fascia 2 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di256.000 | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00192 / 1K token Output · Token in output $0.00768 / 1K token Input · Lettura dalla cache $0.000384 / 1K token Input · Scrittura nella cache $0.0024 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneAnthropic Messages · Tariffe base per token | Listino delle tariffeTariffa base | Token di contesto, più di— | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneAnthropic Messages · Fascia 1 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di0 | Token di contesto, fino al limite incluso256.000 | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneAnthropic Messages · Fascia 2 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di256.000 | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00192 / 1K token Output · Token in output $0.00768 / 1K token Input · Lettura dalla cache $0.000384 / 1K token Input · Scrittura nella cache $0.0024 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
Esempi di richieste
Ailoot · Anthropic Messages
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 source-material file}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen3.7-plus", "max_tokens": 1024, "messages": []}')
f=Path(os.environ["AILOOT_TEXT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 source material")
text=f.read_text(encoding="utf-8")
if not text.strip():raise SystemExit("Source material must contain text")
p["messages"]=[{"role":"user","content":"Summarize this material and quote supporting source passages.\n\n"+text}]
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
-H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_FILE:?Set your actual PNG JPEG or WebP image}"
export AILOOT_IMAGE_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen3.7-plus", "max_tokens": 1024, "messages": [{"role": "user", "content": [{"type": "text", "text": "Read labels and numbers in this image; flag unreadable text."}]}]}')
import base64
f=Path(os.environ["AILOOT_IMAGE_FILE"])
if not f.is_file():raise SystemExit("Choose an actual PNG JPEG or WebP image")
raw=f.read_bytes()
mime="image/png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "image/jpeg" if raw.startswith(b"\xff\xd8") else "image/webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else None
if not mime:raise SystemExit("Use PNG JPEG or WebP")
b64=base64.b64encode(raw).decode()
p["messages"][0]["content"].append({"type":"image","source":{"type":"base64","media_type":mime,"data":b64}})
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
-H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
import anthropic
import os
if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client = anthropic.Anthropic(base_url="https://api.ailoot.ai", api_key=os.environ["AILOOT_API_KEY"], max_retries=0)
msg = client.messages.create(
model="qwen3.7-plus",
max_tokens=1024,
messages=[{"role": "user", "content": "Explain the difference between an observation and a hypothesis in three sentences."}],
)
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
save_result(msg.to_dict(mode="json"))
import Anthropic from "@anthropic-ai/sdk";
if (!process.env.AILOOT_API_KEY?.trim()) throw new Error("Set AILOOT_API_KEY before making a request");
const client = new Anthropic({ baseURL: "https://api.ailoot.ai", apiKey: process.env.AILOOT_API_KEY, maxRetries: 0 });
const msg = await client.messages.create({
model: "qwen3.7-plus",
max_tokens: 1024,
messages: [{ role: "user", content: "Explain the difference between an observation and a hypothesis in three sentences." }],
});
import { writeFileSync } from "node:fs";
function saveResult(data, stem = "result") {
writeFileSync(stem + ".json", JSON.stringify(data, null, 2));
console.log(JSON.stringify(data, null, 2));
const saveBlob = (encoded, suffix, label) => {
const raw = Buffer.from(encoded, "base64");
const ext = raw.subarray(0,8).equals(Buffer.from([137,80,78,71,13,10,26,10])) ? "png" : raw[0]===255 && raw[1]===216 ? "jpg" : raw.subarray(0,4).toString()==="RIFF" && raw.subarray(8,12).toString()==="WEBP" ? "webp" : suffix;
const file = `${stem}-${label}.${ext}`;
writeFileSync(file, raw); console.log("Saved", file);
};
for (const [i, block] of (data.content || []).entries()) console.log("Content", i, JSON.stringify(block));
for (const choice of data.choices || []) console.log("Choice", choice.index, JSON.stringify(choice.message || choice.delta || {}));
for (const [i, item] of (data.output || []).entries()) {
console.log("Output", i, JSON.stringify(item));
if (item.type === "image_generation_call" && item.result) saveBlob(item.result, item.output_format || "bin", `output-${i}`);
}
for (const [ci, candidate] of (data.candidates || []).entries()) {
for (const [pi, part] of (candidate.content?.parts || []).entries()) {
console.log("Candidate/part", ci, pi, JSON.stringify(part));
const blob = part.inlineData || part.inline_data;
if (blob?.data) {
const mime = blob.mimeType || blob.mime_type;
const suffix = ({"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"})[mime] || "bin";
saveBlob(blob.data, suffix, `candidate-${ci}-part-${pi}`);
}
}
}
}
saveResult(msg);
import anthropic,os
from pathlib import Path
if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=anthropic.Anthropic(base_url="https://api.ailoot.ai",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
with client.messages.stream(model='qwen3.7-plus',max_tokens=1024,messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}]) as stream:
with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
for event in stream:
payload=event.to_dict(mode="json")
log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
print(json.dumps(payload,ensure_ascii=False))
final=stream.get_final_message()
save_result(final.to_dict(mode="json"),"stream-result")
Ricevi e salva i risultati
Ailoot · Anthropic Messages
json o SSE
Conserva tutti i risultati completati
Conserva ogni risposta, file e parte di contenuto restituiti per intero.
Conserva tutti i blocchi di contenuto, le firme di ragionamento e gli ID effettivi di utilizzo degli strumenti. Assembla tutti i delta dei blocchi SSE; il primo blocco di testo non è l’uscita completa.
Se occorre verificare la risposta originale
Conserva gli ID e le intestazioni di richiesta/risposta. Non viene fornito alcun URL generico per recuperare un’attività testuale.
Campi della risposta
| Campo | Tipo |
|---|---|
Campoid | Tipostring |
Campomodel | Tipostring |
Campocontent[] | Tipotext|thinking|tool_use|other content block |
Campostop_reason | Tipostring|null |
Campousage | Tipoobject |
Errori e passaggi successivi
| Risposta | Condizione | Passaggio successivo |
|---|---|---|
Risposta400 · invalid_request_error | CondizioneCampi obbligatori, rappresentazione del materiale o valore del parametro non validi | Passaggio successivoCorreggi i campi indicati prima di una nuova richiesta di creazione. |
Alias
Alias del modello
Ailoot qwen3.7-plus, qwen-plus
Ailoot Ultra qwen3.7-plus, qwen/qwen3.7-plus
Alias dei percorsi dei metodi
/chat/completions
ID di chiamata correlati
Ailoot · OpenAI Responses POST /v1/responses qwen3.7-plus
qwen3.7-plusqwen3.7-plusqwen-plus
Introduzione
Qwen3.7 Plus è il modello Qwen di Alibaba per attività testuali e con immagini, con risposte testuali. Il profilo pubblicato combina un contesto di un milione di token, ragionamento, strumenti basati su funzioni e controlli degli output strutturati per assistenti e analisi documentale o visiva.
- Input accettati
- Testo · Immagini
- Risultati
- Testo
Disponibile in Ailoot · input e metodi
Ailoot · OpenAI Responses POST /v1/responses
- Tipi di input
text,image- Tipi di output
text- Contesto
- 991.808 tokens
- Output massimo
- 131.072 tokens
- Formato di output
- json o SSE
| Campo | Tipo | Requisito | Valori e limiti | Predefinito |
|---|---|---|---|---|
Campomodel | Tipostring | RequisitoObbligatorio | Valori e limiti qwen3.7-plus | Predefinito— |
Campoinput | Tipostring|input_item[] | RequisitoObbligatorio | Valori e limiti | Predefinito— |
Campoinstructions | Tipostring | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campoinput[].type | Tipostring | RequisitoFacoltativo | Valori e limiti message, reasoning, function_call, function_call_output | Predefinito— |
Campoinput[].content | Tipostring|content_part[] | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campoinput[].call_id | Tipostring | RequisitoFacoltativo | Valori e limiti Si applica quando: function_call_output; conserva il call_id effettivamente restituito | Predefinito— |
Campoinput[].output | Tipostring|content_part[] | RequisitoFacoltativo | Valori e limiti Si applica quando: function_call_output | Predefinito— |
Campomax_output_tokens | Tipointeger | RequisitoFacoltativo | Valori e limiti Minimo: 1 Dipende dal modello | Predefinito— |
Campostream | Tipoboolean | RequisitoFacoltativo | Valori e limiti | Predefinitofalse |
Campotemperature | Tiponumber | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotop_p | Tiponumber | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotools | Tipotool[] | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotool_choice | Tipostring|object | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campoparallel_tool_calls | Tipoboolean | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Camporeasoning.effort | Tipostring | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Camporeasoning.summary | Tipostring | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotext.format | Tipoobject | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotext.verbosity | Tipostring | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campoinclude | Tipostring[] | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campostore | Tipoboolean | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campoprevious_response_id | Tipostring | RequisitoFacoltativo | Valori e limiti Requisito dell’ID: Solo un ID di risposta effettivo proveniente da una continuazione supportata Dipende dal modello | Predefinito— |
Camposervice_tier | Tipostring | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campoprompt_cache_key | Tipostring | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campoprompt_cache_options | Tipoobject | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Combinazioni di materiali in input
Testo · Testo UTF8
Testo in ingresso o parte input_text
Testo + immagine
{type:input_image,image_url}
Parametri e ciclo di vita del metodo
| Parametro | Contratto |
|---|---|
Parametromaterial_types | Contrattotext, image |
Parametrorequired | Contrattomodel, input |
Parametrooptional_controls | Contrattonull |
Parametrocontent_type | Contrattoapplication/json |
Parametrotext_file_material | ContrattoContenuto UTF-8 effettivo inserito come testo; ID di file/URLs richiedono supporto separato ed esatto |
Ciclo di vita: exact retained published method
Le strutture dei metodi e gli ID sono esatti; la capacità del fornitore è distinta dall’ammissione delle richieste.
Tariffe
Tariffe dei metodi Ailoot
POST /v1/responses- Input
- 0,0004 USD / 1K
- Output
- 0,0016 USD / 1K
- Lettura dalla cache
- 0,00008 USD / 1K
- Scrittura nella cache
- 0,0004 USD / 1K
- Scrittura nella cache, 5 min
- 0,0004 USD / 1K tokens
- code_interpreter_call
- 0,00 USD per chiamata
- image_search_call
- 0,008 USD per chiamata
- web_extractor_call
- 0,00 USD per chiamata
- web_search_call
- 0,01 USD per chiamata
- web_search_image_call
- 0,008 USD per chiamata
- Numero massimo di chiamate code_interpreter_call
- 8
- Numero massimo di chiamate image_search_call
- 8
- Numero massimo di chiamate web_extractor_call
- 8
- Numero massimo di chiamate web_search_call
- 8
- Numero massimo di chiamate web_search_image_call
- 8
Prezzi per lunghezza della richiesta · OpenAI Responses
| Dimensione della richiesta, in token | Input | Output | Lettura dalla cache | Scrittura nella cache | Cache 5 min | Cache 1 ora |
|---|---|---|---|---|---|---|
| Dimensione della richiesta, in token(0; 256.000] | Input0,0004 USD | Output0,0016 USD | Lettura dalla cache0,00008 USD | Scrittura nella cache0,0004 USD | Cache 5 min0,0004 USD | Cache 1 oraTariffa base: — |
| Dimensione della richiesta, in token(256.000; ∞) | Input0,0012 USD | Output0,0048 USD | Lettura dalla cache≈0,00024 USD | Scrittura nella cache0,0012 USD | Cache 5 min0,0012 USD | Cache 1 oraTariffa base: — |
Tariffe in USD per 1K token. Se non è impostata alcuna tariffa, viene ereditata la tariffa base di questo metodo; «—» indica che non è impostata alcuna tariffa base.
Ailoot prenota un importo stimato prima di una richiesta. Dopo il risultato, addebita il costo finale in base all’utilizzo misurato. Per lo streaming, l’addebito usa il record finale di utilizzo. Come funzionano la prenotazione e l’addebito finale →
Dettagli della tariffa di riferimento
I listini di riferimento del modello non modificano la selezione del metodo, i preventivi o gli addebiti. Gli addebiti attivi usano le tariffe del metodo Ailoot selezionato.
Listini di riferimento del modello
Prezzi per configurazione
Associa ogni costo alle condizioni indicate. Usa una sola tariffa per ogni insieme di configurazioni alternative.
| Configurazione | Listino delle tariffe | Token di contesto, più di | Token di contesto, fino al limite incluso | Costo |
|---|---|---|---|---|
| ConfigurazioneOpenAI Chat · Tariffe base per token | Listino delle tariffeTariffa base | Token di contesto, più di— | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneOpenAI Chat · Fascia 1 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di0 | Token di contesto, fino al limite incluso256.000 | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneOpenAI Chat · Fascia 2 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di256.000 | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00192 / 1K token Output · Token in output $0.00768 / 1K token Input · Lettura dalla cache $0.000384 / 1K token Input · Scrittura nella cache $0.0024 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneAnthropic Messages · Tariffe base per token | Listino delle tariffeTariffa base | Token di contesto, più di— | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneAnthropic Messages · Fascia 1 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di0 | Token di contesto, fino al limite incluso256.000 | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneAnthropic Messages · Fascia 2 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di256.000 | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00192 / 1K token Output · Token in output $0.00768 / 1K token Input · Lettura dalla cache $0.000384 / 1K token Input · Scrittura nella cache $0.0024 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
Esempi di richieste
Ailoot · OpenAI Responses
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 source-material file}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen3.7-plus", "input": ""}')
f=Path(os.environ["AILOOT_TEXT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 source material")
text=f.read_text(encoding="utf-8")
if not text.strip():raise SystemExit("Source material must contain text")
p["input"]="Summarize this material and quote supporting source passages.\n\n"+text
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/responses \
-H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
save_result(json.loads(Path("result.json").read_text(encoding="utf-8")))
PY_RESULT
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_FILE:?Set your actual PNG JPEG or WebP image}"
export AILOOT_IMAGE_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen3.7-plus", "input": [{"role": "user", "content": [{"type": "input_text", "text": "Read labels and numbers in this image; flag unreadable text."}]}]}')
import base64
f=Path(os.environ["AILOOT_IMAGE_FILE"])
if not f.is_file():raise SystemExit("Choose an actual PNG JPEG or WebP image")
raw=f.read_bytes()
mime="image/png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "image/jpeg" if raw.startswith(b"\xff\xd8") else "image/webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else None
if not mime:raise SystemExit("Use PNG JPEG or WebP")
b64=base64.b64encode(raw).decode()
p["input"][0]["content"].append({"type":"input_image","image_url":"data:"+mime+";base64,"+b64})
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/responses \
-H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
save_result(json.loads(Path("result.json").read_text(encoding="utf-8")))
PY_RESULT
from openai import OpenAI
import os
if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client = OpenAI(base_url="https://api.ailoot.ai/v1", api_key=os.environ["AILOOT_API_KEY"], max_retries=0)
resp = client.responses.create(model="qwen3.7-plus", input="Explain the difference between an observation and a hypothesis in three sentences.")
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
save_result(resp.to_dict(mode="json"))
import OpenAI from "openai";
if (!process.env.AILOOT_API_KEY?.trim()) throw new Error("Set AILOOT_API_KEY before making a request");
const client = new OpenAI({ baseURL: "https://api.ailoot.ai/v1", apiKey: process.env.AILOOT_API_KEY, maxRetries: 0 });
const resp = await client.responses.create({ model: "qwen3.7-plus", input: "Explain the difference between an observation and a hypothesis in three sentences." });
import { writeFileSync } from "node:fs";
function saveResult(data, stem = "result") {
writeFileSync(stem + ".json", JSON.stringify(data, null, 2));
console.log(JSON.stringify(data, null, 2));
const saveBlob = (encoded, suffix, label) => {
const raw = Buffer.from(encoded, "base64");
const ext = raw.subarray(0,8).equals(Buffer.from([137,80,78,71,13,10,26,10])) ? "png" : raw[0]===255 && raw[1]===216 ? "jpg" : raw.subarray(0,4).toString()==="RIFF" && raw.subarray(8,12).toString()==="WEBP" ? "webp" : suffix;
const file = `${stem}-${label}.${ext}`;
writeFileSync(file, raw); console.log("Saved", file);
};
for (const [i, block] of (data.content || []).entries()) console.log("Content", i, JSON.stringify(block));
for (const choice of data.choices || []) console.log("Choice", choice.index, JSON.stringify(choice.message || choice.delta || {}));
for (const [i, item] of (data.output || []).entries()) {
console.log("Output", i, JSON.stringify(item));
if (item.type === "image_generation_call" && item.result) saveBlob(item.result, item.output_format || "bin", `output-${i}`);
}
for (const [ci, candidate] of (data.candidates || []).entries()) {
for (const [pi, part] of (candidate.content?.parts || []).entries()) {
console.log("Candidate/part", ci, pi, JSON.stringify(part));
const blob = part.inlineData || part.inline_data;
if (blob?.data) {
const mime = blob.mimeType || blob.mime_type;
const suffix = ({"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"})[mime] || "bin";
saveBlob(blob.data, suffix, `candidate-${ci}-part-${pi}`);
}
}
}
}
saveResult(resp);
from openai import OpenAI
import os
from pathlib import Path
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
with client.responses.stream(model="qwen3.7-plus", input="Explain the difference between an observation and a hypothesis in three sentences.") as stream:
with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
for event in stream:
payload=event.to_dict(mode="json")
log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
print(json.dumps(payload,ensure_ascii=False))
final=stream.get_final_response()
save_result(final.to_dict(mode="json"),"stream-result")
Ricevi e salva i risultati
Ailoot · OpenAI Responses
json o SSE
Conserva tutti i risultati completati
Conserva ogni risposta, file e parte di contenuto restituiti per intero.
Conserva ogni elemento di uscita e parte di contenuto, il call_id effettivo della funzione, il ragionamento cifrato e i dati di utilizzo. Nello streaming conserva l’identità completa di eventi ed elementi.
Se occorre verificare la risposta originale
Conserva gli ID e le intestazioni di richiesta/risposta. Non viene fornito alcun URL generico per recuperare un’attività testuale.
Campi della risposta
| Campo | Tipo |
|---|---|
Campoid | Tipostring |
Campostatus | Tipostring |
Campooutput[] | Tipomessage|reasoning|function_call|other item |
Campooutput[].content[] | Tipocontent part |
Campousage | Tipoobject |
Errori e passaggi successivi
| Risposta | Condizione | Passaggio successivo |
|---|---|---|
Risposta400 · invalid_request_error | CondizioneCampi obbligatori, rappresentazione del materiale o valore del parametro non validi | Passaggio successivoCorreggi i campi indicati prima di una nuova richiesta di creazione. |
Alias
Alias del modello
Ailoot qwen3.7-plus, qwen-plus
Ailoot Ultra qwen3.7-plus, qwen/qwen3.7-plus
Alias dei percorsi dei metodi
/chat/completions
ID di chiamata correlati
Ailoot · OpenAI Chat POST /v1/chat/completions qwen3.7-plus
qwen3.7-plusqwen3.7-plusqwen-plus
Introduzione
Qwen3.7 Plus è il modello Qwen di Alibaba per attività testuali e con immagini, con risposte testuali. Il profilo pubblicato combina un contesto di un milione di token, ragionamento, strumenti basati su funzioni e controlli degli output strutturati per assistenti e analisi documentale o visiva.
- Input accettati
- Testo · Immagini
- Risultati
- Testo
Disponibile in Ailoot · input e metodi
Ailoot · OpenAI Chat POST /v1/chat/completions
- Tipi di input
text,image- Tipi di output
text- Contesto
- 991.808 tokens
- Output massimo
- 131.072 tokens
- Formato di output
- json o SSE
| Campo | Tipo | Requisito | Valori e limiti | Predefinito |
|---|---|---|---|---|
Campomodel | Tipostring | RequisitoObbligatorio | Valori e limiti qwen3.7-plus | Predefinito— |
Campomessages | Tipomessage[] | RequisitoObbligatorio | Valori e limiti Numero minimo di elementi: 1 | Predefinito— |
Campomessages[].role | Tipostring | RequisitoObbligatorio | Valori e limiti Esempi: system, user, assistant, tool, function Condizioni: Questi ruoli sono rappresentati esplicitamente dai tipi di compatibilità del codice sorgente; l’insieme esatto dei ruoli rimane specifico del modello. Dipende dal modello | Predefinito— |
Campomessages[].content | Tipostring|content_part[]|null | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campomessages[].tool_calls | Tipotool_call[] | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campomessages[].tool_call_id | Tipostring | RequisitoFacoltativo | Valori e limiti Si applica quando: role=tool; usa l’ID effettivamente restituito | Predefinito— |
Campomessages[].name | Tipostring | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campomessages[].reasoning_content | Tipostring | RequisitoFacoltativo | Valori e limiti Si applica quando: Reinserisci il ragionamento effettivamente restituito quando il modello lo utilizza | Predefinito— |
Campomessages[].reasoning_details | Tipoobject|array | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campomax_tokens | Tipointeger | RequisitoFacoltativo | Valori e limiti Minimo: 1 Dipende dal modello | Predefinito— |
Campomax_completion_tokens | Tipointeger | RequisitoFacoltativo | Valori e limiti Minimo: 1 Dipende dal modello | Predefinito— |
Campostream | Tipoboolean | RequisitoFacoltativo | Valori e limiti | Predefinitofalse |
Campostream_options.include_usage | Tipoboolean | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotemperature | Tiponumber | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotop_p | Tiponumber | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campostop | Tipostring|string[] | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotools | Tipofunction_tool[] | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotools[].type | Tipostring | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotools[].function.name | Tipostring | RequisitoObbligatorio | Valori e limiti Si applica quando: Funzione fornita come strumento | Predefinito— |
Campotools[].function.description | Tipostring | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campotools[].function.parameters | TipoJSON_schema | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campotool_choice | Tipostring|object | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campoparallel_tool_calls | Tipoboolean | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Camporesponse_format | Tipoobject | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Camporeasoning_effort | Tipostring | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Camporeasoning | Tipoobject | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Camposervice_tier | Tipostring | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campoinstructions | Tipostring | RequisitoFacoltativo | Valori e limiti Campo di compatibilità | Predefinito— |
Campofunctions | Tipofunction[] | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campofunction_call | Tipostring|object | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campoprompt_cache_options | Tipoobject | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Combinazioni di materiali in input
Testo · Testo UTF8
messages[].content
Testo + immagine
{type:image_url,image_url:{url,detail}}
Parametri e ciclo di vita del metodo
| Parametro | Contratto |
|---|---|
Parametromaterial_types | Contrattotext, image |
Parametrorequired | Contrattomodel, messages |
Parametrooptional_controls | Contrattonull |
Parametrocontent_type | Contrattoapplication/json |
Parametrotext_file_material | ContrattoContenuto UTF-8 effettivo inserito come testo; ID di file/URLs richiedono supporto separato ed esatto |
Ciclo di vita: exact retained published method
Le strutture dei metodi e gli ID sono esatti; la capacità del fornitore è distinta dall’ammissione delle richieste.
Tariffe
Tariffe dei metodi Ailoot
POST /v1/chat/completions- Input
- 0,0004 USD / 1K
- Output
- 0,0016 USD / 1K
- Lettura dalla cache
- 0,00008 USD / 1K
- Scrittura nella cache
- 0,0004 USD / 1K
- Scrittura nella cache, 5 min
- 0,0004 USD / 1K tokens
Prezzi per lunghezza della richiesta · OpenAI Chat
| Dimensione della richiesta, in token | Input | Output | Lettura dalla cache | Scrittura nella cache | Cache 5 min | Cache 1 ora |
|---|---|---|---|---|---|---|
| Dimensione della richiesta, in token(0; 256.000] | Input0,0004 USD | Output0,0016 USD | Lettura dalla cache0,00008 USD | Scrittura nella cache0,0004 USD | Cache 5 min0,0004 USD | Cache 1 oraTariffa base: — |
| Dimensione della richiesta, in token(256.000; ∞) | Input0,0012 USD | Output0,0048 USD | Lettura dalla cache≈0,00024 USD | Scrittura nella cache0,0012 USD | Cache 5 min0,0012 USD | Cache 1 oraTariffa base: — |
Tariffe in USD per 1K token. Se non è impostata alcuna tariffa, viene ereditata la tariffa base di questo metodo; «—» indica che non è impostata alcuna tariffa base.
Ailoot prenota un importo stimato prima di una richiesta. Dopo il risultato, addebita il costo finale in base all’utilizzo misurato. Per lo streaming, l’addebito usa il record finale di utilizzo. Come funzionano la prenotazione e l’addebito finale →
Dettagli della tariffa di riferimento
I listini di riferimento del modello non modificano la selezione del metodo, i preventivi o gli addebiti. Gli addebiti attivi usano le tariffe del metodo Ailoot selezionato.
Listini di riferimento del modello
Prezzi per configurazione
Associa ogni costo alle condizioni indicate. Usa una sola tariffa per ogni insieme di configurazioni alternative.
| Configurazione | Listino delle tariffe | Token di contesto, più di | Token di contesto, fino al limite incluso | Costo |
|---|---|---|---|---|
| ConfigurazioneOpenAI Chat · Tariffe base per token | Listino delle tariffeTariffa base | Token di contesto, più di— | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneOpenAI Chat · Fascia 1 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di0 | Token di contesto, fino al limite incluso256.000 | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneOpenAI Chat · Fascia 2 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di256.000 | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00192 / 1K token Output · Token in output $0.00768 / 1K token Input · Lettura dalla cache $0.000384 / 1K token Input · Scrittura nella cache $0.0024 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneAnthropic Messages · Tariffe base per token | Listino delle tariffeTariffa base | Token di contesto, più di— | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneAnthropic Messages · Fascia 1 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di0 | Token di contesto, fino al limite incluso256.000 | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneAnthropic Messages · Fascia 2 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di256.000 | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00192 / 1K token Output · Token in output $0.00768 / 1K token Input · Lettura dalla cache $0.000384 / 1K token Input · Scrittura nella cache $0.0024 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
Esempi di richieste
Ailoot · OpenAI Chat
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 source-material file}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen3.7-plus", "messages": []}')
f=Path(os.environ["AILOOT_TEXT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 source material")
text=f.read_text(encoding="utf-8")
if not text.strip():raise SystemExit("Source material must contain text")
p["messages"]=[{"role":"user","content":"Summarize this material and quote supporting source passages.\n\n"+text}]
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
-H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_FILE:?Set your actual PNG JPEG or WebP image}"
export AILOOT_IMAGE_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen3.7-plus", "messages": [{"role": "user", "content": [{"type": "text", "text": "Read labels and numbers in this image; flag unreadable text."}]}]}')
import base64
f=Path(os.environ["AILOOT_IMAGE_FILE"])
if not f.is_file():raise SystemExit("Choose an actual PNG JPEG or WebP image")
raw=f.read_bytes()
mime="image/png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "image/jpeg" if raw.startswith(b"\xff\xd8") else "image/webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else None
if not mime:raise SystemExit("Use PNG JPEG or WebP")
b64=base64.b64encode(raw).decode()
p["messages"][0]["content"].append({"type":"image_url","image_url":{"url":"data:"+mime+";base64,"+b64}})
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
-H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
from openai import OpenAI
import os
if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client = OpenAI(base_url="https://api.ailoot.ai/v1", api_key=os.environ["AILOOT_API_KEY"], max_retries=0)
resp = client.chat.completions.create(
model="qwen3.7-plus",
messages=[{"role": "user", "content": "Explain the difference between an observation and a hypothesis in three sentences."}],
)
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
save_result(resp.to_dict(mode="json"))
import OpenAI from "openai";
if (!process.env.AILOOT_API_KEY?.trim()) throw new Error("Set AILOOT_API_KEY before making a request");
const client = new OpenAI({ baseURL: "https://api.ailoot.ai/v1", apiKey: process.env.AILOOT_API_KEY, maxRetries: 0 });
const resp = await client.chat.completions.create({
model: "qwen3.7-plus",
messages: [{ role: "user", content: "Explain the difference between an observation and a hypothesis in three sentences." }],
});
import { writeFileSync } from "node:fs";
function saveResult(data, stem = "result") {
writeFileSync(stem + ".json", JSON.stringify(data, null, 2));
console.log(JSON.stringify(data, null, 2));
const saveBlob = (encoded, suffix, label) => {
const raw = Buffer.from(encoded, "base64");
const ext = raw.subarray(0,8).equals(Buffer.from([137,80,78,71,13,10,26,10])) ? "png" : raw[0]===255 && raw[1]===216 ? "jpg" : raw.subarray(0,4).toString()==="RIFF" && raw.subarray(8,12).toString()==="WEBP" ? "webp" : suffix;
const file = `${stem}-${label}.${ext}`;
writeFileSync(file, raw); console.log("Saved", file);
};
for (const [i, block] of (data.content || []).entries()) console.log("Content", i, JSON.stringify(block));
for (const choice of data.choices || []) console.log("Choice", choice.index, JSON.stringify(choice.message || choice.delta || {}));
for (const [i, item] of (data.output || []).entries()) {
console.log("Output", i, JSON.stringify(item));
if (item.type === "image_generation_call" && item.result) saveBlob(item.result, item.output_format || "bin", `output-${i}`);
}
for (const [ci, candidate] of (data.candidates || []).entries()) {
for (const [pi, part] of (candidate.content?.parts || []).entries()) {
console.log("Candidate/part", ci, pi, JSON.stringify(part));
const blob = part.inlineData || part.inline_data;
if (blob?.data) {
const mime = blob.mimeType || blob.mime_type;
const suffix = ({"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"})[mime] || "bin";
saveBlob(blob.data, suffix, `candidate-${ci}-part-${pi}`);
}
}
}
}
saveResult(resp);
from openai import OpenAI
import os
from pathlib import Path
if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
with client.chat.completions.stream(model='qwen3.7-plus',messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}]) as stream:
with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
for event in stream:
payload=event.to_dict(mode="json")
log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
print(json.dumps(payload,ensure_ascii=False))
final=stream.get_final_completion()
save_result(final.to_dict(mode="json"),"stream-result")
Ricevi e salva i risultati
Ailoot · OpenAI Chat
json o SSE
Conserva tutti i risultati completati
Conserva ogni risposta, file e parte di contenuto restituiti per intero.
Conserva ogni scelta con contenuto, chiamate agli strumenti e ragionamento. In SSE assembla i delta per indice di scelta e strumento e conserva il motivo finale di completamento e i dati di utilizzo.
Se occorre verificare la risposta originale
Conserva gli ID e le intestazioni di richiesta/risposta. Non viene fornito alcun URL generico per recuperare un’attività testuale.
Campi della risposta
| Campo | Tipo |
|---|---|
Campochoices[].index | Tipointeger |
Campochoices[].message.content | Tipostring|null |
Campochoices[].message.tool_calls | Tipotool_call[] |
Campochoices[].message.reasoning_content | Tipostring |
Campochoices[].message.reasoning_details | Tipoobject|array |
Campochoices[].finish_reason | Tipostring|null |
Campousage | Tipoobject |
Errori e passaggi successivi
| Risposta | Condizione | Passaggio successivo |
|---|---|---|
Risposta400 · invalid_request_error | CondizioneCampi obbligatori, rappresentazione del materiale o valore del parametro non validi | Passaggio successivoCorreggi i campi indicati prima di una nuova richiesta di creazione. |
Alias
Alias del modello
Ailoot qwen3.7-plus, qwen-plus
Ailoot Ultra qwen3.7-plus, qwen/qwen3.7-plus
Alias dei percorsi dei metodi
/chat/completions
ID di chiamata correlati
Ailoot Ultra · OpenAI Chat POST /v1/chat/completions qwen3.7-plus
qwen3.7-plusqwen3.7-plusqwen/qwen3.7-plus
Introduzione
Qwen3.7 Plus è il modello Qwen di Alibaba per attività testuali e con immagini, con risposte testuali. Il profilo pubblicato combina un contesto di un milione di token, ragionamento, strumenti basati su funzioni e controlli degli output strutturati per assistenti e analisi documentale o visiva.
- Input accettati
- Testo
- Risultati
- Testo
Disponibile in Ailoot · input e metodi
Ailoot Ultra · OpenAI Chat POST /v1/chat/completions
- Tipi di input
text- Tipi di output
text- Formato di output
- json o SSE
| Campo | Tipo | Requisito | Valori e limiti | Predefinito |
|---|---|---|---|---|
Campomodel | Tipostring | RequisitoObbligatorio | Valori e limiti qwen3.7-plus | Predefinito— |
Campomessages | Tipomessage[] | RequisitoObbligatorio | Valori e limiti Numero minimo di elementi: 1 | Predefinito— |
Campomessages[].role | Tipostring | RequisitoObbligatorio | Valori e limiti Dipende dal modello | Predefinito— |
Campomessages[].content | Tipostring | RequisitoFacoltativo | Valori e limiti Si applica quando: Conversazione testuale | Predefinito— |
Campostream | Tipoboolean | RequisitoFacoltativo | Valori e limiti | Predefinitofalse |
Combinazioni di materiali in input
Testo · Testo UTF8
messages[].content
Parametri e ciclo di vita del metodo
| Parametro | Contratto |
|---|---|
Parametrocontent_type | Contrattoapplication/json |
Parametrorequired | Contrattomodel, messages |
Parametromaterial_types | Contrattotext |
Parametromessages | ContrattoArray di messaggi con struttura role/content |
Parametrofile_material | ContrattoDocumento UTF-8 effettivo inserito come testo letterale; nessun ID di file dedotto |
Parametrooptional_controls | Contrattostream |
Parametrocontrol_scope | ContrattoConversazione testuale; stream è un booleano e per impostazione predefinita vale false. |
Parametrooutput_modalities | Contrattotext |
Parametrohosted_operations | Contrattofalse |
Parametromultimodal_input_binding | Contrattonull |
Alias del metodo: /chat/completions
Ciclo di vita: synchronous_or_streamed
Invia l’ID esatto del modello con messages.
La lunghezza del contesto non è un limite di uscita.
Un file di testo può fornire testo letterale; gli ingressi immagine/audio/oggetto file richiedono un’associazione esatta.
Tariffe
Le tariffe non aggiungono opzioni alla richiesta. I parametri supportati sono elencati nel metodo selezionato.
- Modalità rapida
- Tariffa standard Quando è selezionata la modalità rapida
- Modalità flex
- Tariffa standard Quando è selezionata la modalità flex
- Sforzo massimo di ragionamento
- Tariffa standard Quando lo sforzo massimo di ragionamento usa l'adeguamento predefinito (default)
Tariffe Ailoot
Prezzi per configurazione
Associa ogni costo alle condizioni indicate. Usa una sola tariffa per ogni insieme di configurazioni alternative.
| Configurazione | Listino delle tariffe | Token di contesto, più di | Token di contesto, fino al limite incluso | Costo |
|---|---|---|---|---|
| ConfigurazioneTariffe di base dei token | Listino delle tariffeTariffa base | Token di contesto, più di— | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneFascia 1 di lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di0 | Token di contesto, fino al limite incluso256.000 | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneFascia 2 di lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di256.000 | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00192 / 1K token Output · Token in output $0.00768 / 1K token Input · Lettura dalla cache $0.000384 / 1K token Input · Scrittura nella cache $0.0024 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
Ailoot prenota un importo stimato prima di una richiesta. Dopo il risultato, addebita il costo finale in base all’utilizzo misurato. Per lo streaming, l’addebito usa il record finale di utilizzo. Come funzionano la prenotazione e l’addebito finale →
Esempi di richieste
Ailoot Ultra · OpenAI Chat
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model":"qwen3.7-plus","messages":[{"role":"user","content":"hello"}],"stream":false}')
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
-H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
r=json.loads(Path("result.json").read_text())
for x in r.get("choices",[]):
if x.get("message",{}).get("content"): print(x["message"]["content"])
PY_RESULT
from openai import OpenAI
import os
if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
result=client.chat.completions.create(model="qwen3.7-plus", messages=[{"role":"user","content":"hello"}], stream=False)
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
save_result(result.to_dict(mode="json"))
Ricevi e salva i risultati
Ailoot Ultra · OpenAI Chat
json o SSE
Conserva tutti i risultati completati
Conserva ogni risposta, file e parte di contenuto restituiti per intero.
Conserva ogni scelta con contenuto, chiamate agli strumenti e ragionamento. In SSE assembla i delta per indice di scelta e strumento e conserva il motivo finale di completamento e i dati di utilizzo.
Se occorre verificare la risposta originale
Conserva gli ID e le intestazioni di richiesta/risposta. Non viene fornito alcun URL generico per recuperare un’attività testuale.
Campi della risposta
| Campo | Tipo |
|---|---|
Campochoices[].index | Tipointeger |
Campochoices[].message.content | Tipostring|null |
Campochoices[].message.tool_calls | Tipotool_call[] |
Campochoices[].message.reasoning_content | Tipostring |
Campochoices[].message.reasoning_details | Tipoobject|array |
Campochoices[].finish_reason | Tipostring|null |
Campousage | Tipoobject |
Errori e passaggi successivi
| Risposta | Condizione | Passaggio successivo |
|---|---|---|
Risposta400 · invalid_request_error | CondizioneCampi obbligatori, rappresentazione del materiale o valore del parametro non validi | Passaggio successivoCorreggi i campi indicati prima di una nuova richiesta di creazione. |
Alias
Alias del modello
Ailoot qwen3.7-plus, qwen-plus
Ailoot Ultra qwen3.7-plus, qwen/qwen3.7-plus
Alias dei percorsi dei metodi
/chat/completions
ID di chiamata correlati
Ailoot Ultra · Anthropic Messages POST /v1/messages qwen3.7-plus
qwen3.7-plusqwen3.7-plusqwen/qwen3.7-plus
Introduzione
Qwen3.7 Plus è il modello Qwen di Alibaba per attività testuali e con immagini, con risposte testuali. Il profilo pubblicato combina un contesto di un milione di token, ragionamento, strumenti basati su funzioni e controlli degli output strutturati per assistenti e analisi documentale o visiva.
- Input accettati
- Testo
- Risultati
- json · sse
Disponibile in Ailoot · input e metodi
Ailoot Ultra · Anthropic Messages POST /v1/messages
- Tipi di input
text- Tipi di output
json,sse- Formato di output
- JSON o SSE
| Campo | Tipo | Requisito | Valori e limiti | Predefinito |
|---|---|---|---|---|
Campomodel | Tipostring | RequisitoObbligatorio | Valori e limiti qwen3.7-plus | Predefinito— |
Campomessages | Tipomessage[] | RequisitoObbligatorio | Valori e limiti | Predefinito— |
Campomessages[].role | Tipostring | RequisitoObbligatorio | Valori e limiti user, assistant | Predefinito— |
Campomessages[].content | Tipostring | RequisitoObbligatorio | Valori e limiti | Predefinito— |
Campomax_tokens | Tipointeger | RequisitoObbligatorio | Valori e limiti | Predefinito— |
Campostream | Tipoboolean | RequisitoFacoltativo | Valori e limiti | Predefinitofalse |
Combinazioni di materiali in input
Testo · Testo UTF-8
Stringa messages[].content
Parametri e ciclo di vita del metodo
| Parametro | Contratto |
|---|---|
Parametrocontent_type | Contrattoapplication/json |
Parametrorequired | Contrattomodel, messages, max_tokens |
Parametrooptional_controls | Contrattostream |
Parametromaterial_types | Contrattotext |
Parametrotext_file_material | ContrattoLeggi il documento UTF-8 effettivo e inserisci il testo nell’ingresso indicato o nella stringa del contenuto del messaggio. |
Ciclo di vita: synchronous_or_streamed
Tariffe
Le tariffe non aggiungono opzioni alla richiesta. I parametri supportati sono elencati nel metodo selezionato.
- Modalità rapida
- Tariffa standard Quando è selezionata la modalità rapida
- Modalità flex
- Tariffa standard Quando è selezionata la modalità flex
- Sforzo massimo di ragionamento
- Tariffa standard Quando lo sforzo massimo di ragionamento usa l'adeguamento predefinito (default)
Tariffe Ailoot
Prezzi per configurazione
Associa ogni costo alle condizioni indicate. Usa una sola tariffa per ogni insieme di configurazioni alternative.
| Configurazione | Listino delle tariffe | Token di contesto, più di | Token di contesto, fino al limite incluso | Costo |
|---|---|---|---|---|
| ConfigurazioneTariffe di base dei token | Listino delle tariffeTariffa base | Token di contesto, più di— | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneFascia 1 di lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di0 | Token di contesto, fino al limite incluso256.000 | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneFascia 2 di lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di256.000 | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00192 / 1K token Output · Token in output $0.00768 / 1K token Input · Lettura dalla cache $0.000384 / 1K token Input · Scrittura nella cache $0.0024 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
Ailoot prenota un importo stimato prima di una richiesta. Dopo il risultato, addebita il costo finale in base all’utilizzo misurato. Per lo streaming, l’addebito usa il record finale di utilizzo. Come funzionano la prenotazione e l’addebito finale →
Esempi di richieste
Ailoot Ultra · Anthropic Messages
{
"model": "qwen3.7-plus",
"max_tokens": 128,
"messages": [
{
"role": "user",
"content": "Summarize the incident report."
}
],
"stream": false
}set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 document}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json, os
from pathlib import Path
source_file = Path(os.environ['AILOOT_TEXT_FILE'])
if not source_file.is_file():
raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')
text = source_file.read_text(encoding='utf-8')
if not text.strip():
raise SystemExit('Choose a document containing text')
payload = {'model': 'qwen3.7-plus', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}
payload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\n\n' + text
Path('request.json').write_text(json.dumps(payload, ensure_ascii=False), encoding='utf-8')
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
-H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
result = json.loads(Path('result.json').read_text(encoding='utf-8'))
print(json.dumps(result, ensure_ascii=False, indent=2))
PY_RESULT
import json, os
from pathlib import Path
source_file = Path(os.environ['AILOOT_TEXT_FILE'])
if not source_file.is_file():
raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')
text = source_file.read_text(encoding='utf-8')
if not text.strip():
raise SystemExit('Choose a document containing text')
payload = {'model': 'qwen3.7-plus', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}
payload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\n\n' + text
from urllib.request import Request, urlopen
from urllib.error import HTTPError
api_key = os.environ['AILOOT_API_KEY']
if not api_key.strip():
raise SystemExit('Set AILOOT_API_KEY before making a request')
headers = {'x-api-key': 'PLACEHOLDER_KEY', 'anthropic-version': '2023-06-01', 'Content-Type': 'application/json'}
headers['x-api-key'] = api_key
request = Request('https://api.ailoot.ai/v1/messages', data=json.dumps(payload, ensure_ascii=False).encode('utf-8'), headers=headers, method='POST')
try:
with urlopen(request, timeout=120) as response:
raw = response.read()
Path('response-headers.txt').write_text(str(response.headers), encoding='utf-8')
except HTTPError as error:
Path('result.json').write_bytes(error.read())
Path('response-headers.txt').write_text(str(error.headers), encoding='utf-8')
raise
Path('result.json').write_bytes(raw)
import json
from pathlib import Path
result = json.loads(Path('result.json').read_text(encoding='utf-8'))
print(json.dumps(result, ensure_ascii=False, indent=2))
Ricevi e salva i risultati
Ailoot Ultra · Anthropic Messages
JSON o SSE
Conserva tutti i risultati completati
Conserva ogni risposta, file e parte di contenuto restituiti per intero.
Conserva tutti i blocchi di contenuto, le firme di ragionamento e gli ID effettivi di utilizzo degli strumenti. Assembla tutti i delta dei blocchi SSE; il primo blocco di testo non è l’uscita completa.
Se occorre verificare la risposta originale
Conserva gli ID e le intestazioni di richiesta/risposta. Non viene fornito alcun URL generico per recuperare un’attività testuale.
Campi della risposta
| Campo | Tipo |
|---|---|
Campoid | Tipostring |
Campomodel | Tipostring |
Campocontent[] | Tipotext|thinking|tool_use|other content block |
Campostop_reason | Tipostring|null |
Campousage | Tipoobject |
Errori e passaggi successivi
| Risposta | Condizione | Passaggio successivo |
|---|---|---|
Risposta400 · invalid_request_error | CondizioneCampi obbligatori, rappresentazione del materiale o valore del parametro non validi | Passaggio successivoCorreggi i campi indicati prima di una nuova richiesta di creazione. |
Alias
Alias del modello
Ailoot qwen3.7-plus, qwen-plus
Ailoot Ultra qwen3.7-plus, qwen/qwen3.7-plus
Alias dei percorsi dei metodi
/chat/completions
ID di chiamata correlati
Ailoot · Anthropic Messages POST /v1/messages qwen-plus
qwen-plusqwen3.7-plusqwen-plus
Introduzione
Qwen3.7 Plus è il modello Qwen di Alibaba per attività testuali e con immagini, con risposte testuali. Il profilo pubblicato combina un contesto di un milione di token, ragionamento, strumenti basati su funzioni e controlli degli output strutturati per assistenti e analisi documentale o visiva.
- Input accettati
- Testo · Immagini
- Risultati
- Testo
Disponibile in Ailoot · input e metodi
Ailoot · Anthropic Messages POST /v1/messages
- Tipi di input
text,image- Tipi di output
text- Contesto
- 991.808 tokens
- Output massimo
- 131.072 tokens
- Formato di output
- json o SSE
| Campo | Tipo | Requisito | Valori e limiti | Predefinito |
|---|---|---|---|---|
Campomodel | Tipostring | RequisitoObbligatorio | Valori e limiti qwen-plus | Predefinito— |
Campomessages | Tipomessage[] | RequisitoObbligatorio | Valori e limiti Numero minimo di elementi: 1 | Predefinito— |
Campomessages[].role | Tipostring | RequisitoObbligatorio | Valori e limiti user, assistant | Predefinito— |
Campomessages[].content | Tipostring|content_block[] | RequisitoObbligatorio | Valori e limiti | Predefinito— |
Camposystem | Tipostring|content_block[] | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campomax_tokens | Tipointeger | RequisitoObbligatorio | Valori e limiti Minimo: 1 Il limite si applica a: Limite esatto del modello o della scheda selezionati | Predefinito— |
Campostream | Tipoboolean | RequisitoFacoltativo | Valori e limiti | Predefinitofalse |
Campotemperature | Tiponumber | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotop_p | Tiponumber | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campostop_sequences | Tipostring[] | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotools | Tipotool[] | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotools[].name | Tipostring | RequisitoFacoltativo | Valori e limiti Si applica quando: Strumento fornito | Predefinito— |
Campotools[].description | Tipostring | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campotools[].input_schema | TipoJSON_schema | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campotool_choice | Tipoobject | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campothinking.type | Tipostring | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campothinking.budget_tokens | Tipointeger | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campooutput_config.effort | Tipostring | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campometadata | Tipoobject | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campocache_control | Tipoobject | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Combinazioni di materiali in input
Testo · Testo UTF8
messages[].content o blocco type=text
Testo + immagine
{type:image,source:{type:base64,media_type,data}} o origine type=url
Parametri e ciclo di vita del metodo
| Parametro | Contratto |
|---|---|
Parametromaterial_types | Contrattotext, image |
Parametrorequired | Contrattomodel, messages, max_tokens |
Parametrooptional_controls | Contrattonull |
Parametrocontent_type | Contrattoapplication/json |
Parametrotext_file_material | ContrattoContenuto UTF-8 effettivo inserito come testo; ID di file/URLs richiedono supporto separato ed esatto |
Ciclo di vita: exact retained published method
Le strutture dei metodi e gli ID sono esatti; la capacità del fornitore è distinta dall’ammissione delle richieste.
Tariffe
Tariffe dei metodi Ailoot
POST /v1/messages- Input
- 0,0004 USD / 1K
- Output
- 0,0016 USD / 1K
- Lettura dalla cache
- 0,00004 USD / 1K
- Scrittura nella cache
- 0,0005 USD / 1K
- Scrittura nella cache, 5 min
- 0,0005 USD / 1K tokens
Prezzi per lunghezza della richiesta · Anthropic Messages
| Dimensione della richiesta, in token | Input | Output | Lettura dalla cache | Scrittura nella cache | Cache 5 min | Cache 1 ora |
|---|---|---|---|---|---|---|
| Dimensione della richiesta, in token(0; 256.000] | Input0,0004 USD | Output0,0016 USD | Lettura dalla cache0,00004 USD | Scrittura nella cache0,0005 USD | Cache 5 min0,0005 USD | Cache 1 oraTariffa base: — |
| Dimensione della richiesta, in token(256.000; ∞) | Input0,0012 USD | Output0,0048 USD | Lettura dalla cache≈0,00012 USD | Scrittura nella cache0,0015 USD | Cache 5 min0,0015 USD | Cache 1 oraTariffa base: — |
Tariffe in USD per 1K token. Se non è impostata alcuna tariffa, viene ereditata la tariffa base di questo metodo; «—» indica che non è impostata alcuna tariffa base.
Ailoot prenota un importo stimato prima di una richiesta. Dopo il risultato, addebita il costo finale in base all’utilizzo misurato. Per lo streaming, l’addebito usa il record finale di utilizzo. Come funzionano la prenotazione e l’addebito finale →
Dettagli della tariffa di riferimento
I listini di riferimento del modello non modificano la selezione del metodo, i preventivi o gli addebiti. Gli addebiti attivi usano le tariffe del metodo Ailoot selezionato.
Listini di riferimento del modello
Prezzi per configurazione
Associa ogni costo alle condizioni indicate. Usa una sola tariffa per ogni insieme di configurazioni alternative.
| Configurazione | Listino delle tariffe | Token di contesto, più di | Token di contesto, fino al limite incluso | Costo |
|---|---|---|---|---|
| ConfigurazioneOpenAI Chat · Tariffe base per token | Listino delle tariffeTariffa base | Token di contesto, più di— | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneOpenAI Chat · Fascia 1 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di0 | Token di contesto, fino al limite incluso256.000 | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneOpenAI Chat · Fascia 2 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di256.000 | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00192 / 1K token Output · Token in output $0.00768 / 1K token Input · Lettura dalla cache $0.000384 / 1K token Input · Scrittura nella cache $0.0024 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneAnthropic Messages · Tariffe base per token | Listino delle tariffeTariffa base | Token di contesto, più di— | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneAnthropic Messages · Fascia 1 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di0 | Token di contesto, fino al limite incluso256.000 | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneAnthropic Messages · Fascia 2 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di256.000 | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00192 / 1K token Output · Token in output $0.00768 / 1K token Input · Lettura dalla cache $0.000384 / 1K token Input · Scrittura nella cache $0.0024 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
Esempi di richieste
Ailoot · Anthropic Messages
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 source-material file}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen-plus", "max_tokens": 1024, "messages": []}')
f=Path(os.environ["AILOOT_TEXT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 source material")
text=f.read_text(encoding="utf-8")
if not text.strip():raise SystemExit("Source material must contain text")
p["messages"]=[{"role":"user","content":"Summarize this material and quote supporting source passages.\n\n"+text}]
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
-H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_FILE:?Set your actual PNG JPEG or WebP image}"
export AILOOT_IMAGE_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen-plus", "max_tokens": 1024, "messages": [{"role": "user", "content": [{"type": "text", "text": "Read labels and numbers in this image; flag unreadable text."}]}]}')
import base64
f=Path(os.environ["AILOOT_IMAGE_FILE"])
if not f.is_file():raise SystemExit("Choose an actual PNG JPEG or WebP image")
raw=f.read_bytes()
mime="image/png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "image/jpeg" if raw.startswith(b"\xff\xd8") else "image/webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else None
if not mime:raise SystemExit("Use PNG JPEG or WebP")
b64=base64.b64encode(raw).decode()
p["messages"][0]["content"].append({"type":"image","source":{"type":"base64","media_type":mime,"data":b64}})
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
-H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
import anthropic
import os
if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client = anthropic.Anthropic(base_url="https://api.ailoot.ai", api_key=os.environ["AILOOT_API_KEY"], max_retries=0)
msg = client.messages.create(
model="qwen-plus",
max_tokens=1024,
messages=[{"role": "user", "content": "Explain the difference between an observation and a hypothesis in three sentences."}],
)
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
save_result(msg.to_dict(mode="json"))
import Anthropic from "@anthropic-ai/sdk";
if (!process.env.AILOOT_API_KEY?.trim()) throw new Error("Set AILOOT_API_KEY before making a request");
const client = new Anthropic({ baseURL: "https://api.ailoot.ai", apiKey: process.env.AILOOT_API_KEY, maxRetries: 0 });
const msg = await client.messages.create({
model: "qwen-plus",
max_tokens: 1024,
messages: [{ role: "user", content: "Explain the difference between an observation and a hypothesis in three sentences." }],
});
import { writeFileSync } from "node:fs";
function saveResult(data, stem = "result") {
writeFileSync(stem + ".json", JSON.stringify(data, null, 2));
console.log(JSON.stringify(data, null, 2));
const saveBlob = (encoded, suffix, label) => {
const raw = Buffer.from(encoded, "base64");
const ext = raw.subarray(0,8).equals(Buffer.from([137,80,78,71,13,10,26,10])) ? "png" : raw[0]===255 && raw[1]===216 ? "jpg" : raw.subarray(0,4).toString()==="RIFF" && raw.subarray(8,12).toString()==="WEBP" ? "webp" : suffix;
const file = `${stem}-${label}.${ext}`;
writeFileSync(file, raw); console.log("Saved", file);
};
for (const [i, block] of (data.content || []).entries()) console.log("Content", i, JSON.stringify(block));
for (const choice of data.choices || []) console.log("Choice", choice.index, JSON.stringify(choice.message || choice.delta || {}));
for (const [i, item] of (data.output || []).entries()) {
console.log("Output", i, JSON.stringify(item));
if (item.type === "image_generation_call" && item.result) saveBlob(item.result, item.output_format || "bin", `output-${i}`);
}
for (const [ci, candidate] of (data.candidates || []).entries()) {
for (const [pi, part] of (candidate.content?.parts || []).entries()) {
console.log("Candidate/part", ci, pi, JSON.stringify(part));
const blob = part.inlineData || part.inline_data;
if (blob?.data) {
const mime = blob.mimeType || blob.mime_type;
const suffix = ({"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"})[mime] || "bin";
saveBlob(blob.data, suffix, `candidate-${ci}-part-${pi}`);
}
}
}
}
saveResult(msg);
import anthropic,os
from pathlib import Path
if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=anthropic.Anthropic(base_url="https://api.ailoot.ai",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
with client.messages.stream(model='qwen-plus',max_tokens=1024,messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}]) as stream:
with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
for event in stream:
payload=event.to_dict(mode="json")
log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
print(json.dumps(payload,ensure_ascii=False))
final=stream.get_final_message()
save_result(final.to_dict(mode="json"),"stream-result")
Ricevi e salva i risultati
Ailoot · Anthropic Messages
json o SSE
Conserva tutti i risultati completati
Conserva ogni risposta, file e parte di contenuto restituiti per intero.
Conserva tutti i blocchi di contenuto, le firme di ragionamento e gli ID effettivi di utilizzo degli strumenti. Assembla tutti i delta dei blocchi SSE; il primo blocco di testo non è l’uscita completa.
Se occorre verificare la risposta originale
Conserva gli ID e le intestazioni di richiesta/risposta. Non viene fornito alcun URL generico per recuperare un’attività testuale.
Campi della risposta
| Campo | Tipo |
|---|---|
Campoid | Tipostring |
Campomodel | Tipostring |
Campocontent[] | Tipotext|thinking|tool_use|other content block |
Campostop_reason | Tipostring|null |
Campousage | Tipoobject |
Errori e passaggi successivi
| Risposta | Condizione | Passaggio successivo |
|---|---|---|
Risposta400 · invalid_request_error | CondizioneCampi obbligatori, rappresentazione del materiale o valore del parametro non validi | Passaggio successivoCorreggi i campi indicati prima di una nuova richiesta di creazione. |
Alias
Alias del modello
Ailoot qwen3.7-plus, qwen-plus
Ailoot Ultra qwen3.7-plus, qwen/qwen3.7-plus
Alias dei percorsi dei metodi
/chat/completions
ID di chiamata correlati
Ailoot · OpenAI Responses POST /v1/responses qwen-plus
qwen-plusqwen3.7-plusqwen-plus
Introduzione
Qwen3.7 Plus è il modello Qwen di Alibaba per attività testuali e con immagini, con risposte testuali. Il profilo pubblicato combina un contesto di un milione di token, ragionamento, strumenti basati su funzioni e controlli degli output strutturati per assistenti e analisi documentale o visiva.
- Input accettati
- Testo · Immagini
- Risultati
- Testo
Disponibile in Ailoot · input e metodi
Ailoot · OpenAI Responses POST /v1/responses
- Tipi di input
text,image- Tipi di output
text- Contesto
- 991.808 tokens
- Output massimo
- 131.072 tokens
- Formato di output
- json o SSE
| Campo | Tipo | Requisito | Valori e limiti | Predefinito |
|---|---|---|---|---|
Campomodel | Tipostring | RequisitoObbligatorio | Valori e limiti qwen-plus | Predefinito— |
Campoinput | Tipostring|input_item[] | RequisitoObbligatorio | Valori e limiti | Predefinito— |
Campoinstructions | Tipostring | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campoinput[].type | Tipostring | RequisitoFacoltativo | Valori e limiti message, reasoning, function_call, function_call_output | Predefinito— |
Campoinput[].content | Tipostring|content_part[] | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campoinput[].call_id | Tipostring | RequisitoFacoltativo | Valori e limiti Si applica quando: function_call_output; conserva il call_id effettivamente restituito | Predefinito— |
Campoinput[].output | Tipostring|content_part[] | RequisitoFacoltativo | Valori e limiti Si applica quando: function_call_output | Predefinito— |
Campomax_output_tokens | Tipointeger | RequisitoFacoltativo | Valori e limiti Minimo: 1 Dipende dal modello | Predefinito— |
Campostream | Tipoboolean | RequisitoFacoltativo | Valori e limiti | Predefinitofalse |
Campotemperature | Tiponumber | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotop_p | Tiponumber | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotools | Tipotool[] | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotool_choice | Tipostring|object | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campoparallel_tool_calls | Tipoboolean | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Camporeasoning.effort | Tipostring | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Camporeasoning.summary | Tipostring | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotext.format | Tipoobject | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotext.verbosity | Tipostring | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campoinclude | Tipostring[] | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campostore | Tipoboolean | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campoprevious_response_id | Tipostring | RequisitoFacoltativo | Valori e limiti Requisito dell’ID: Solo un ID di risposta effettivo proveniente da una continuazione supportata Dipende dal modello | Predefinito— |
Camposervice_tier | Tipostring | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campoprompt_cache_key | Tipostring | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campoprompt_cache_options | Tipoobject | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Combinazioni di materiali in input
Testo · Testo UTF8
Testo in ingresso o parte input_text
Testo + immagine
{type:input_image,image_url}
Parametri e ciclo di vita del metodo
| Parametro | Contratto |
|---|---|
Parametromaterial_types | Contrattotext, image |
Parametrorequired | Contrattomodel, input |
Parametrooptional_controls | Contrattonull |
Parametrocontent_type | Contrattoapplication/json |
Parametrotext_file_material | ContrattoContenuto UTF-8 effettivo inserito come testo; ID di file/URLs richiedono supporto separato ed esatto |
Ciclo di vita: exact retained published method
Le strutture dei metodi e gli ID sono esatti; la capacità del fornitore è distinta dall’ammissione delle richieste.
Tariffe
Tariffe dei metodi Ailoot
POST /v1/responses- Input
- 0,0004 USD / 1K
- Output
- 0,0016 USD / 1K
- Lettura dalla cache
- 0,00008 USD / 1K
- Scrittura nella cache
- 0,0004 USD / 1K
- Scrittura nella cache, 5 min
- 0,0004 USD / 1K tokens
- code_interpreter_call
- 0,00 USD per chiamata
- image_search_call
- 0,008 USD per chiamata
- web_extractor_call
- 0,00 USD per chiamata
- web_search_call
- 0,01 USD per chiamata
- web_search_image_call
- 0,008 USD per chiamata
- Numero massimo di chiamate code_interpreter_call
- 8
- Numero massimo di chiamate image_search_call
- 8
- Numero massimo di chiamate web_extractor_call
- 8
- Numero massimo di chiamate web_search_call
- 8
- Numero massimo di chiamate web_search_image_call
- 8
Prezzi per lunghezza della richiesta · OpenAI Responses
| Dimensione della richiesta, in token | Input | Output | Lettura dalla cache | Scrittura nella cache | Cache 5 min | Cache 1 ora |
|---|---|---|---|---|---|---|
| Dimensione della richiesta, in token(0; 256.000] | Input0,0004 USD | Output0,0016 USD | Lettura dalla cache0,00008 USD | Scrittura nella cache0,0004 USD | Cache 5 min0,0004 USD | Cache 1 oraTariffa base: — |
| Dimensione della richiesta, in token(256.000; ∞) | Input0,0012 USD | Output0,0048 USD | Lettura dalla cache≈0,00024 USD | Scrittura nella cache0,0012 USD | Cache 5 min0,0012 USD | Cache 1 oraTariffa base: — |
Tariffe in USD per 1K token. Se non è impostata alcuna tariffa, viene ereditata la tariffa base di questo metodo; «—» indica che non è impostata alcuna tariffa base.
Ailoot prenota un importo stimato prima di una richiesta. Dopo il risultato, addebita il costo finale in base all’utilizzo misurato. Per lo streaming, l’addebito usa il record finale di utilizzo. Come funzionano la prenotazione e l’addebito finale →
Dettagli della tariffa di riferimento
I listini di riferimento del modello non modificano la selezione del metodo, i preventivi o gli addebiti. Gli addebiti attivi usano le tariffe del metodo Ailoot selezionato.
Listini di riferimento del modello
Prezzi per configurazione
Associa ogni costo alle condizioni indicate. Usa una sola tariffa per ogni insieme di configurazioni alternative.
| Configurazione | Listino delle tariffe | Token di contesto, più di | Token di contesto, fino al limite incluso | Costo |
|---|---|---|---|---|
| ConfigurazioneOpenAI Chat · Tariffe base per token | Listino delle tariffeTariffa base | Token di contesto, più di— | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneOpenAI Chat · Fascia 1 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di0 | Token di contesto, fino al limite incluso256.000 | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneOpenAI Chat · Fascia 2 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di256.000 | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00192 / 1K token Output · Token in output $0.00768 / 1K token Input · Lettura dalla cache $0.000384 / 1K token Input · Scrittura nella cache $0.0024 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneAnthropic Messages · Tariffe base per token | Listino delle tariffeTariffa base | Token di contesto, più di— | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneAnthropic Messages · Fascia 1 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di0 | Token di contesto, fino al limite incluso256.000 | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneAnthropic Messages · Fascia 2 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di256.000 | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00192 / 1K token Output · Token in output $0.00768 / 1K token Input · Lettura dalla cache $0.000384 / 1K token Input · Scrittura nella cache $0.0024 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
Esempi di richieste
Ailoot · OpenAI Responses
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 source-material file}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen-plus", "input": ""}')
f=Path(os.environ["AILOOT_TEXT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 source material")
text=f.read_text(encoding="utf-8")
if not text.strip():raise SystemExit("Source material must contain text")
p["input"]="Summarize this material and quote supporting source passages.\n\n"+text
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/responses \
-H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
save_result(json.loads(Path("result.json").read_text(encoding="utf-8")))
PY_RESULT
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_FILE:?Set your actual PNG JPEG or WebP image}"
export AILOOT_IMAGE_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen-plus", "input": [{"role": "user", "content": [{"type": "input_text", "text": "Read labels and numbers in this image; flag unreadable text."}]}]}')
import base64
f=Path(os.environ["AILOOT_IMAGE_FILE"])
if not f.is_file():raise SystemExit("Choose an actual PNG JPEG or WebP image")
raw=f.read_bytes()
mime="image/png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "image/jpeg" if raw.startswith(b"\xff\xd8") else "image/webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else None
if not mime:raise SystemExit("Use PNG JPEG or WebP")
b64=base64.b64encode(raw).decode()
p["input"][0]["content"].append({"type":"input_image","image_url":"data:"+mime+";base64,"+b64})
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/responses \
-H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
save_result(json.loads(Path("result.json").read_text(encoding="utf-8")))
PY_RESULT
from openai import OpenAI
import os
if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client = OpenAI(base_url="https://api.ailoot.ai/v1", api_key=os.environ["AILOOT_API_KEY"], max_retries=0)
resp = client.responses.create(model="qwen-plus", input="Explain the difference between an observation and a hypothesis in three sentences.")
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
save_result(resp.to_dict(mode="json"))
import OpenAI from "openai";
if (!process.env.AILOOT_API_KEY?.trim()) throw new Error("Set AILOOT_API_KEY before making a request");
const client = new OpenAI({ baseURL: "https://api.ailoot.ai/v1", apiKey: process.env.AILOOT_API_KEY, maxRetries: 0 });
const resp = await client.responses.create({ model: "qwen-plus", input: "Explain the difference between an observation and a hypothesis in three sentences." });
import { writeFileSync } from "node:fs";
function saveResult(data, stem = "result") {
writeFileSync(stem + ".json", JSON.stringify(data, null, 2));
console.log(JSON.stringify(data, null, 2));
const saveBlob = (encoded, suffix, label) => {
const raw = Buffer.from(encoded, "base64");
const ext = raw.subarray(0,8).equals(Buffer.from([137,80,78,71,13,10,26,10])) ? "png" : raw[0]===255 && raw[1]===216 ? "jpg" : raw.subarray(0,4).toString()==="RIFF" && raw.subarray(8,12).toString()==="WEBP" ? "webp" : suffix;
const file = `${stem}-${label}.${ext}`;
writeFileSync(file, raw); console.log("Saved", file);
};
for (const [i, block] of (data.content || []).entries()) console.log("Content", i, JSON.stringify(block));
for (const choice of data.choices || []) console.log("Choice", choice.index, JSON.stringify(choice.message || choice.delta || {}));
for (const [i, item] of (data.output || []).entries()) {
console.log("Output", i, JSON.stringify(item));
if (item.type === "image_generation_call" && item.result) saveBlob(item.result, item.output_format || "bin", `output-${i}`);
}
for (const [ci, candidate] of (data.candidates || []).entries()) {
for (const [pi, part] of (candidate.content?.parts || []).entries()) {
console.log("Candidate/part", ci, pi, JSON.stringify(part));
const blob = part.inlineData || part.inline_data;
if (blob?.data) {
const mime = blob.mimeType || blob.mime_type;
const suffix = ({"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"})[mime] || "bin";
saveBlob(blob.data, suffix, `candidate-${ci}-part-${pi}`);
}
}
}
}
saveResult(resp);
from openai import OpenAI
import os
from pathlib import Path
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
with client.responses.stream(model="qwen-plus", input="Explain the difference between an observation and a hypothesis in three sentences.") as stream:
with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
for event in stream:
payload=event.to_dict(mode="json")
log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
print(json.dumps(payload,ensure_ascii=False))
final=stream.get_final_response()
save_result(final.to_dict(mode="json"),"stream-result")
Ricevi e salva i risultati
Ailoot · OpenAI Responses
json o SSE
Conserva tutti i risultati completati
Conserva ogni risposta, file e parte di contenuto restituiti per intero.
Conserva ogni elemento di uscita e parte di contenuto, il call_id effettivo della funzione, il ragionamento cifrato e i dati di utilizzo. Nello streaming conserva l’identità completa di eventi ed elementi.
Se occorre verificare la risposta originale
Conserva gli ID e le intestazioni di richiesta/risposta. Non viene fornito alcun URL generico per recuperare un’attività testuale.
Campi della risposta
| Campo | Tipo |
|---|---|
Campoid | Tipostring |
Campostatus | Tipostring |
Campooutput[] | Tipomessage|reasoning|function_call|other item |
Campooutput[].content[] | Tipocontent part |
Campousage | Tipoobject |
Errori e passaggi successivi
| Risposta | Condizione | Passaggio successivo |
|---|---|---|
Risposta400 · invalid_request_error | CondizioneCampi obbligatori, rappresentazione del materiale o valore del parametro non validi | Passaggio successivoCorreggi i campi indicati prima di una nuova richiesta di creazione. |
Alias
Alias del modello
Ailoot qwen3.7-plus, qwen-plus
Ailoot Ultra qwen3.7-plus, qwen/qwen3.7-plus
Alias dei percorsi dei metodi
/chat/completions
ID di chiamata correlati
Ailoot · OpenAI Chat POST /v1/chat/completions qwen-plus
qwen-plusqwen3.7-plusqwen-plus
Introduzione
Qwen3.7 Plus è il modello Qwen di Alibaba per attività testuali e con immagini, con risposte testuali. Il profilo pubblicato combina un contesto di un milione di token, ragionamento, strumenti basati su funzioni e controlli degli output strutturati per assistenti e analisi documentale o visiva.
- Input accettati
- Testo · Immagini
- Risultati
- Testo
Disponibile in Ailoot · input e metodi
Ailoot · OpenAI Chat POST /v1/chat/completions
- Tipi di input
text,image- Tipi di output
text- Contesto
- 991.808 tokens
- Output massimo
- 131.072 tokens
- Formato di output
- json o SSE
| Campo | Tipo | Requisito | Valori e limiti | Predefinito |
|---|---|---|---|---|
Campomodel | Tipostring | RequisitoObbligatorio | Valori e limiti qwen-plus | Predefinito— |
Campomessages | Tipomessage[] | RequisitoObbligatorio | Valori e limiti Numero minimo di elementi: 1 | Predefinito— |
Campomessages[].role | Tipostring | RequisitoObbligatorio | Valori e limiti Esempi: system, user, assistant, tool, function Condizioni: Questi ruoli sono rappresentati esplicitamente dai tipi di compatibilità del codice sorgente; l’insieme esatto dei ruoli rimane specifico del modello. Dipende dal modello | Predefinito— |
Campomessages[].content | Tipostring|content_part[]|null | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campomessages[].tool_calls | Tipotool_call[] | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campomessages[].tool_call_id | Tipostring | RequisitoFacoltativo | Valori e limiti Si applica quando: role=tool; usa l’ID effettivamente restituito | Predefinito— |
Campomessages[].name | Tipostring | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campomessages[].reasoning_content | Tipostring | RequisitoFacoltativo | Valori e limiti Si applica quando: Reinserisci il ragionamento effettivamente restituito quando il modello lo utilizza | Predefinito— |
Campomessages[].reasoning_details | Tipoobject|array | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campomax_tokens | Tipointeger | RequisitoFacoltativo | Valori e limiti Minimo: 1 Dipende dal modello | Predefinito— |
Campomax_completion_tokens | Tipointeger | RequisitoFacoltativo | Valori e limiti Minimo: 1 Dipende dal modello | Predefinito— |
Campostream | Tipoboolean | RequisitoFacoltativo | Valori e limiti | Predefinitofalse |
Campostream_options.include_usage | Tipoboolean | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotemperature | Tiponumber | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotop_p | Tiponumber | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campostop | Tipostring|string[] | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotools | Tipofunction_tool[] | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotools[].type | Tipostring | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotools[].function.name | Tipostring | RequisitoObbligatorio | Valori e limiti Si applica quando: Funzione fornita come strumento | Predefinito— |
Campotools[].function.description | Tipostring | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campotools[].function.parameters | TipoJSON_schema | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campotool_choice | Tipostring|object | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campoparallel_tool_calls | Tipoboolean | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Camporesponse_format | Tipoobject | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Camporeasoning_effort | Tipostring | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Camporeasoning | Tipoobject | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Camposervice_tier | Tipostring | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campoinstructions | Tipostring | RequisitoFacoltativo | Valori e limiti Campo di compatibilità | Predefinito— |
Campofunctions | Tipofunction[] | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campofunction_call | Tipostring|object | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campoprompt_cache_options | Tipoobject | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Combinazioni di materiali in input
Testo · Testo UTF8
messages[].content
Testo + immagine
{type:image_url,image_url:{url,detail}}
Parametri e ciclo di vita del metodo
| Parametro | Contratto |
|---|---|
Parametromaterial_types | Contrattotext, image |
Parametrorequired | Contrattomodel, messages |
Parametrooptional_controls | Contrattonull |
Parametrocontent_type | Contrattoapplication/json |
Parametrotext_file_material | ContrattoContenuto UTF-8 effettivo inserito come testo; ID di file/URLs richiedono supporto separato ed esatto |
Ciclo di vita: exact retained published method
Le strutture dei metodi e gli ID sono esatti; la capacità del fornitore è distinta dall’ammissione delle richieste.
Tariffe
Tariffe dei metodi Ailoot
POST /v1/chat/completions- Input
- 0,0004 USD / 1K
- Output
- 0,0016 USD / 1K
- Lettura dalla cache
- 0,00008 USD / 1K
- Scrittura nella cache
- 0,0004 USD / 1K
- Scrittura nella cache, 5 min
- 0,0004 USD / 1K tokens
Prezzi per lunghezza della richiesta · OpenAI Chat
| Dimensione della richiesta, in token | Input | Output | Lettura dalla cache | Scrittura nella cache | Cache 5 min | Cache 1 ora |
|---|---|---|---|---|---|---|
| Dimensione della richiesta, in token(0; 256.000] | Input0,0004 USD | Output0,0016 USD | Lettura dalla cache0,00008 USD | Scrittura nella cache0,0004 USD | Cache 5 min0,0004 USD | Cache 1 oraTariffa base: — |
| Dimensione della richiesta, in token(256.000; ∞) | Input0,0012 USD | Output0,0048 USD | Lettura dalla cache≈0,00024 USD | Scrittura nella cache0,0012 USD | Cache 5 min0,0012 USD | Cache 1 oraTariffa base: — |
Tariffe in USD per 1K token. Se non è impostata alcuna tariffa, viene ereditata la tariffa base di questo metodo; «—» indica che non è impostata alcuna tariffa base.
Ailoot prenota un importo stimato prima di una richiesta. Dopo il risultato, addebita il costo finale in base all’utilizzo misurato. Per lo streaming, l’addebito usa il record finale di utilizzo. Come funzionano la prenotazione e l’addebito finale →
Dettagli della tariffa di riferimento
I listini di riferimento del modello non modificano la selezione del metodo, i preventivi o gli addebiti. Gli addebiti attivi usano le tariffe del metodo Ailoot selezionato.
Listini di riferimento del modello
Prezzi per configurazione
Associa ogni costo alle condizioni indicate. Usa una sola tariffa per ogni insieme di configurazioni alternative.
| Configurazione | Listino delle tariffe | Token di contesto, più di | Token di contesto, fino al limite incluso | Costo |
|---|---|---|---|---|
| ConfigurazioneOpenAI Chat · Tariffe base per token | Listino delle tariffeTariffa base | Token di contesto, più di— | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneOpenAI Chat · Fascia 1 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di0 | Token di contesto, fino al limite incluso256.000 | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneOpenAI Chat · Fascia 2 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di256.000 | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00192 / 1K token Output · Token in output $0.00768 / 1K token Input · Lettura dalla cache $0.000384 / 1K token Input · Scrittura nella cache $0.0024 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneAnthropic Messages · Tariffe base per token | Listino delle tariffeTariffa base | Token di contesto, più di— | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneAnthropic Messages · Fascia 1 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di0 | Token di contesto, fino al limite incluso256.000 | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneAnthropic Messages · Fascia 2 in base alla lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di256.000 | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00192 / 1K token Output · Token in output $0.00768 / 1K token Input · Lettura dalla cache $0.000384 / 1K token Input · Scrittura nella cache $0.0024 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
Esempi di richieste
Ailoot · OpenAI Chat
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 source-material file}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen-plus", "messages": []}')
f=Path(os.environ["AILOOT_TEXT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 source material")
text=f.read_text(encoding="utf-8")
if not text.strip():raise SystemExit("Source material must contain text")
p["messages"]=[{"role":"user","content":"Summarize this material and quote supporting source passages.\n\n"+text}]
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
-H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_FILE:?Set your actual PNG JPEG or WebP image}"
export AILOOT_IMAGE_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen-plus", "messages": [{"role": "user", "content": [{"type": "text", "text": "Read labels and numbers in this image; flag unreadable text."}]}]}')
import base64
f=Path(os.environ["AILOOT_IMAGE_FILE"])
if not f.is_file():raise SystemExit("Choose an actual PNG JPEG or WebP image")
raw=f.read_bytes()
mime="image/png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "image/jpeg" if raw.startswith(b"\xff\xd8") else "image/webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else None
if not mime:raise SystemExit("Use PNG JPEG or WebP")
b64=base64.b64encode(raw).decode()
p["messages"][0]["content"].append({"type":"image_url","image_url":{"url":"data:"+mime+";base64,"+b64}})
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
-H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
from openai import OpenAI
import os
if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client = OpenAI(base_url="https://api.ailoot.ai/v1", api_key=os.environ["AILOOT_API_KEY"], max_retries=0)
resp = client.chat.completions.create(
model="qwen-plus",
messages=[{"role": "user", "content": "Explain the difference between an observation and a hypothesis in three sentences."}],
)
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
save_result(resp.to_dict(mode="json"))
import OpenAI from "openai";
if (!process.env.AILOOT_API_KEY?.trim()) throw new Error("Set AILOOT_API_KEY before making a request");
const client = new OpenAI({ baseURL: "https://api.ailoot.ai/v1", apiKey: process.env.AILOOT_API_KEY, maxRetries: 0 });
const resp = await client.chat.completions.create({
model: "qwen-plus",
messages: [{ role: "user", content: "Explain the difference between an observation and a hypothesis in three sentences." }],
});
import { writeFileSync } from "node:fs";
function saveResult(data, stem = "result") {
writeFileSync(stem + ".json", JSON.stringify(data, null, 2));
console.log(JSON.stringify(data, null, 2));
const saveBlob = (encoded, suffix, label) => {
const raw = Buffer.from(encoded, "base64");
const ext = raw.subarray(0,8).equals(Buffer.from([137,80,78,71,13,10,26,10])) ? "png" : raw[0]===255 && raw[1]===216 ? "jpg" : raw.subarray(0,4).toString()==="RIFF" && raw.subarray(8,12).toString()==="WEBP" ? "webp" : suffix;
const file = `${stem}-${label}.${ext}`;
writeFileSync(file, raw); console.log("Saved", file);
};
for (const [i, block] of (data.content || []).entries()) console.log("Content", i, JSON.stringify(block));
for (const choice of data.choices || []) console.log("Choice", choice.index, JSON.stringify(choice.message || choice.delta || {}));
for (const [i, item] of (data.output || []).entries()) {
console.log("Output", i, JSON.stringify(item));
if (item.type === "image_generation_call" && item.result) saveBlob(item.result, item.output_format || "bin", `output-${i}`);
}
for (const [ci, candidate] of (data.candidates || []).entries()) {
for (const [pi, part] of (candidate.content?.parts || []).entries()) {
console.log("Candidate/part", ci, pi, JSON.stringify(part));
const blob = part.inlineData || part.inline_data;
if (blob?.data) {
const mime = blob.mimeType || blob.mime_type;
const suffix = ({"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"})[mime] || "bin";
saveBlob(blob.data, suffix, `candidate-${ci}-part-${pi}`);
}
}
}
}
saveResult(resp);
from openai import OpenAI
import os
from pathlib import Path
if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
with client.chat.completions.stream(model='qwen-plus',messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}]) as stream:
with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
for event in stream:
payload=event.to_dict(mode="json")
log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
print(json.dumps(payload,ensure_ascii=False))
final=stream.get_final_completion()
save_result(final.to_dict(mode="json"),"stream-result")
Ricevi e salva i risultati
Ailoot · OpenAI Chat
json o SSE
Conserva tutti i risultati completati
Conserva ogni risposta, file e parte di contenuto restituiti per intero.
Conserva ogni scelta con contenuto, chiamate agli strumenti e ragionamento. In SSE assembla i delta per indice di scelta e strumento e conserva il motivo finale di completamento e i dati di utilizzo.
Se occorre verificare la risposta originale
Conserva gli ID e le intestazioni di richiesta/risposta. Non viene fornito alcun URL generico per recuperare un’attività testuale.
Campi della risposta
| Campo | Tipo |
|---|---|
Campochoices[].index | Tipointeger |
Campochoices[].message.content | Tipostring|null |
Campochoices[].message.tool_calls | Tipotool_call[] |
Campochoices[].message.reasoning_content | Tipostring |
Campochoices[].message.reasoning_details | Tipoobject|array |
Campochoices[].finish_reason | Tipostring|null |
Campousage | Tipoobject |
Errori e passaggi successivi
| Risposta | Condizione | Passaggio successivo |
|---|---|---|
Risposta400 · invalid_request_error | CondizioneCampi obbligatori, rappresentazione del materiale o valore del parametro non validi | Passaggio successivoCorreggi i campi indicati prima di una nuova richiesta di creazione. |
Alias
Alias del modello
Ailoot qwen3.7-plus, qwen-plus
Ailoot Ultra qwen3.7-plus, qwen/qwen3.7-plus
Alias dei percorsi dei metodi
/chat/completions
ID di chiamata correlati
Ailoot Ultra · OpenAI Chat POST /v1/chat/completions qwen/qwen3.7-plus
qwen/qwen3.7-plusqwen3.7-plusqwen/qwen3.7-plus
Introduzione
Qwen3.7 Plus è il modello Qwen di Alibaba per attività testuali e con immagini, con risposte testuali. Il profilo pubblicato combina un contesto di un milione di token, ragionamento, strumenti basati su funzioni e controlli degli output strutturati per assistenti e analisi documentale o visiva.
- Input accettati
- Testo
- Risultati
- Testo
Disponibile in Ailoot · input e metodi
Ailoot Ultra · OpenAI Chat POST /v1/chat/completions
- Tipi di input
text- Tipi di output
text- Formato di output
- json o SSE
| Campo | Tipo | Requisito | Valori e limiti | Predefinito |
|---|---|---|---|---|
Campomodel | Tipostring | RequisitoObbligatorio | Valori e limiti qwen/qwen3.7-plus | Predefinito— |
Campomessages | Tipomessage[] | RequisitoObbligatorio | Valori e limiti Numero minimo di elementi: 1 | Predefinito— |
Campomessages[].role | Tipostring | RequisitoObbligatorio | Valori e limiti Esempi: system, user, assistant, tool, function Condizioni: Questi ruoli sono rappresentati esplicitamente dai tipi di compatibilità del codice sorgente; l’insieme esatto dei ruoli rimane specifico del modello. Dipende dal modello | Predefinito— |
Campomessages[].content | Tipostring|content_part[]|null | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campomessages[].tool_calls | Tipotool_call[] | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campomessages[].tool_call_id | Tipostring | RequisitoFacoltativo | Valori e limiti Si applica quando: role=tool; usa l’ID effettivamente restituito | Predefinito— |
Campomessages[].name | Tipostring | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campomessages[].reasoning_content | Tipostring | RequisitoFacoltativo | Valori e limiti Si applica quando: Reinserisci il ragionamento effettivamente restituito quando il modello lo utilizza | Predefinito— |
Campomessages[].reasoning_details | Tipoobject|array | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campomax_tokens | Tipointeger | RequisitoFacoltativo | Valori e limiti Minimo: 1 Dipende dal modello | Predefinito— |
Campomax_completion_tokens | Tipointeger | RequisitoFacoltativo | Valori e limiti Minimo: 1 Dipende dal modello | Predefinito— |
Campostream | Tipoboolean | RequisitoFacoltativo | Valori e limiti | Predefinitofalse |
Campostream_options.include_usage | Tipoboolean | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotemperature | Tiponumber | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotop_p | Tiponumber | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campostop | Tipostring|string[] | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotools | Tipofunction_tool[] | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campotools[].type | Tipostring | RequisitoFacoltativo | Valori e limiti function Dipende dal modello | Predefinito— |
Campotools[].function.name | Tipostring | RequisitoObbligatorio | Valori e limiti Si applica quando: Funzione fornita come strumento | Predefinito— |
Campotools[].function.description | Tipostring | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campotools[].function.parameters | TipoJSON_schema | RequisitoFacoltativo | Valori e limiti | Predefinito— |
Campotool_choice | Tipostring|object | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campoparallel_tool_calls | Tipoboolean | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Camporesponse_format | Tipoobject | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Camporeasoning_effort | Tipostring | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Camporeasoning | Tipoobject | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Camposervice_tier | Tipostring | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campoinstructions | Tipostring | RequisitoFacoltativo | Valori e limiti Campo di compatibilità | Predefinito— |
Campofunctions | Tipofunction[] | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campofunction_call | Tipostring|object | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campoprompt_cache_options | Tipoobject | RequisitoFacoltativo | Valori e limiti Dipende dal modello | Predefinito— |
Campomodalities | Tipostring[] | RequisitoFacoltativo | Valori e limiti text | Predefinito— |
Campoprovider | Tipoobject | RequisitoFacoltativo | Valori e limiti Condizioni: provider.options viene rifiutato su questa rotta testuale Ultra | Predefinito— |
Campocache_control.ttl | Tipostring | RequisitoFacoltativo | Valori e limiti Condizioni: 1h viene rifiutato nelle posizioni effettive della cache dei prompt | Predefinito— |
Combinazioni di materiali in input
Testo · Testo UTF8
messages[].content
Parametri e ciclo di vita del metodo
| Parametro | Contratto |
|---|---|
Parametrocontent_type | Contrattoapplication/json |
Parametrorequired | Contrattomodel, messages |
Parametromaterial_types | Contrattotext |
Parametromessages | ContrattoArray di messaggi con struttura role/content |
Parametrofile_material | ContrattoDocumento UTF-8 effettivo inserito come testo letterale; nessun ID di file dedotto |
Parametrooptional_controls | Contrattostream, temperature, top_p, stop, max_tokens, max_completion_tokens, reasoning, response_format, tools, tool_choice |
Parametrocontrol_scope | ContrattoSpecifico del modello; gli strumenti di funzione dell’utente differiscono dagli strumenti ospitati |
Parametrooutput_modalities | Contrattotext |
Parametrohosted_operations | Contrattofalse |
Parametromultimodal_input_binding | Contrattonull |
Ciclo di vita: synchronous_or_streamed
Invia l’ID esatto del modello con messages.
La lunghezza del contesto non è un limite di uscita.
Un file di testo può fornire testo letterale; gli ingressi immagine/audio/oggetto file richiedono un’associazione esatta.
Tariffe
Le tariffe non aggiungono opzioni alla richiesta. I parametri supportati sono elencati nel metodo selezionato.
- Modalità rapida
- Tariffa standard Quando è selezionata la modalità rapida
- Modalità flex
- Tariffa standard Quando è selezionata la modalità flex
- Sforzo massimo di ragionamento
- Tariffa standard Quando lo sforzo massimo di ragionamento usa l'adeguamento predefinito (default)
Tariffe Ailoot
Prezzi per configurazione
Associa ogni costo alle condizioni indicate. Usa una sola tariffa per ogni insieme di configurazioni alternative.
| Configurazione | Listino delle tariffe | Token di contesto, più di | Token di contesto, fino al limite incluso | Costo |
|---|---|---|---|---|
| ConfigurazioneTariffe di base dei token | Listino delle tariffeTariffa base | Token di contesto, più di— | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneFascia 1 di lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di0 | Token di contesto, fino al limite incluso256.000 | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneFascia 2 di lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di256.000 | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00192 / 1K token Output · Token in output $0.00768 / 1K token Input · Lettura dalla cache $0.000384 / 1K token Input · Scrittura nella cache $0.0024 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
Ailoot prenota un importo stimato prima di una richiesta. Dopo il risultato, addebita il costo finale in base all’utilizzo misurato. Per lo streaming, l’addebito usa il record finale di utilizzo. Come funzionano la prenotazione e l’addebito finale →
Esempi di richieste
Ailoot Ultra · OpenAI Chat
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen/qwen3.7-plus", "messages": [{"role": "user", "content": "Explain the difference between an observation and a hypothesis in three sentences."}]}')
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
-H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
r=json.loads(Path("result.json").read_text())
for x in r.get("choices",[]):
if x.get("message",{}).get("content"): print(x["message"]["content"])
PY_RESULT
from openai import OpenAI
import os
if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
result=client.chat.completions.create(model='qwen/qwen3.7-plus',messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}])
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
save_result(result.to_dict(mode="json"))
from openai import OpenAI
import os
from pathlib import Path
if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
import base64, json
from pathlib import Path
def save_result(data, stem="result"):
# Keep every field, including usage, IDs, reasoning and tool requests.
Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
print(json.dumps(data, ensure_ascii=False, indent=2))
def save_blob(encoded, suffix, label):
raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
file = Path(stem + "-" + label + "." + ext)
file.write_bytes(raw)
print("Saved", file)
for index, block in enumerate(data.get("content") or []):
print("Content", index, json.dumps(block, ensure_ascii=False))
for choice in data.get("choices") or []:
print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
for index, item in enumerate(data.get("output") or []):
print("Output", index, json.dumps(item, ensure_ascii=False))
if item.get("type") == "image_generation_call" and item.get("result"):
save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
for ci, candidate in enumerate(data.get("candidates") or []):
for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
blob = part.get("inlineData") or part.get("inline_data")
if blob and blob.get("data"):
mime = blob.get("mimeType") or blob.get("mime_type")
suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))
with client.chat.completions.stream(model='qwen/qwen3.7-plus',messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}]) as stream:
with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
for event in stream:
payload=event.to_dict(mode="json")
log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
print(json.dumps(payload,ensure_ascii=False))
final=stream.get_final_completion()
save_result(final.to_dict(mode="json"),"stream-result")
Ricevi e salva i risultati
Ailoot Ultra · OpenAI Chat
json o SSE
Conserva tutti i risultati completati
Conserva ogni risposta, file e parte di contenuto restituiti per intero.
Conserva ogni scelta con contenuto, chiamate agli strumenti e ragionamento. In SSE assembla i delta per indice di scelta e strumento e conserva il motivo finale di completamento e i dati di utilizzo.
Se occorre verificare la risposta originale
Conserva gli ID e le intestazioni di richiesta/risposta. Non viene fornito alcun URL generico per recuperare un’attività testuale.
Campi della risposta
| Campo | Tipo |
|---|---|
Campochoices[].index | Tipointeger |
Campochoices[].message.content | Tipostring|null |
Campochoices[].message.tool_calls | Tipotool_call[] |
Campochoices[].message.reasoning_content | Tipostring |
Campochoices[].message.reasoning_details | Tipoobject|array |
Campochoices[].finish_reason | Tipostring|null |
Campousage | Tipoobject |
Errori e passaggi successivi
| Risposta | Condizione | Passaggio successivo |
|---|---|---|
Risposta400 · invalid_request_error | CondizioneCampi obbligatori, rappresentazione del materiale o valore del parametro non validi | Passaggio successivoCorreggi i campi indicati prima di una nuova richiesta di creazione. |
Alias
Alias del modello
Ailoot qwen3.7-plus, qwen-plus
Ailoot Ultra qwen3.7-plus, qwen/qwen3.7-plus
Alias dei percorsi dei metodi
/chat/completions
ID di chiamata correlati
Ailoot Ultra · Anthropic Messages POST /v1/messages qwen/qwen3.7-plus
qwen/qwen3.7-plusqwen3.7-plusqwen/qwen3.7-plus
Introduzione
Qwen3.7 Plus è il modello Qwen di Alibaba per attività testuali e con immagini, con risposte testuali. Il profilo pubblicato combina un contesto di un milione di token, ragionamento, strumenti basati su funzioni e controlli degli output strutturati per assistenti e analisi documentale o visiva.
- Input accettati
- Testo
- Risultati
- json · sse
Disponibile in Ailoot · input e metodi
Ailoot Ultra · Anthropic Messages POST /v1/messages
- Tipi di input
text- Tipi di output
json,sse- Formato di output
- JSON o SSE
| Campo | Tipo | Requisito | Valori e limiti | Predefinito |
|---|---|---|---|---|
Campomodel | Tipostring | RequisitoObbligatorio | Valori e limiti qwen/qwen3.7-plus | Predefinito— |
Campomessages | Tipomessage[] | RequisitoObbligatorio | Valori e limiti | Predefinito— |
Campomessages[].role | Tipostring | RequisitoObbligatorio | Valori e limiti user, assistant | Predefinito— |
Campomessages[].content | Tipostring | RequisitoObbligatorio | Valori e limiti | Predefinito— |
Campomax_tokens | Tipointeger | RequisitoObbligatorio | Valori e limiti | Predefinito— |
Campostream | Tipoboolean | RequisitoFacoltativo | Valori e limiti | Predefinitofalse |
Combinazioni di materiali in input
Testo · Testo UTF-8
Stringa messages[].content
Parametri e ciclo di vita del metodo
| Parametro | Contratto |
|---|---|
Parametrocontent_type | Contrattoapplication/json |
Parametrorequired | Contrattomodel, messages, max_tokens |
Parametrooptional_controls | Contrattostream |
Parametromaterial_types | Contrattotext |
Parametrotext_file_material | ContrattoLeggi il documento UTF-8 effettivo e inserisci il testo nell’ingresso indicato o nella stringa del contenuto del messaggio. |
Ciclo di vita: synchronous_or_streamed
Tariffe
Le tariffe non aggiungono opzioni alla richiesta. I parametri supportati sono elencati nel metodo selezionato.
- Modalità rapida
- Tariffa standard Quando è selezionata la modalità rapida
- Modalità flex
- Tariffa standard Quando è selezionata la modalità flex
- Sforzo massimo di ragionamento
- Tariffa standard Quando lo sforzo massimo di ragionamento usa l'adeguamento predefinito (default)
Tariffe Ailoot
Prezzi per configurazione
Associa ogni costo alle condizioni indicate. Usa una sola tariffa per ogni insieme di configurazioni alternative.
| Configurazione | Listino delle tariffe | Token di contesto, più di | Token di contesto, fino al limite incluso | Costo |
|---|---|---|---|---|
| ConfigurazioneTariffe di base dei token | Listino delle tariffeTariffa base | Token di contesto, più di— | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneFascia 1 di lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di0 | Token di contesto, fino al limite incluso256.000 | Costo Input · Token in input $0.00064 / 1K token Output · Token in output $0.00256 / 1K token Input · Lettura dalla cache $0.000128 / 1K token Input · Scrittura nella cache $0.0008 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
| ConfigurazioneFascia 2 di lunghezza della richiesta | Listino delle tariffe— | Token di contesto, più di256.000 | Token di contesto, fino al limite inclusoNessun limite superiore | Costo Input · Token in input $0.00192 / 1K token Output · Token in output $0.00768 / 1K token Input · Lettura dalla cache $0.000384 / 1K token Input · Scrittura nella cache $0.0024 / 1K token Input · Scrittura nella cache, 1 ora — / 1K token |
Ailoot prenota un importo stimato prima di una richiesta. Dopo il risultato, addebita il costo finale in base all’utilizzo misurato. Per lo streaming, l’addebito usa il record finale di utilizzo. Come funzionano la prenotazione e l’addebito finale →
Esempi di richieste
Ailoot Ultra · Anthropic Messages
{
"model": "qwen/qwen3.7-plus",
"max_tokens": 128,
"messages": [
{
"role": "user",
"content": "Summarize the incident report."
}
],
"stream": false
}set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 document}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json, os
from pathlib import Path
source_file = Path(os.environ['AILOOT_TEXT_FILE'])
if not source_file.is_file():
raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')
text = source_file.read_text(encoding='utf-8')
if not text.strip():
raise SystemExit('Choose a document containing text')
payload = {'model': 'qwen/qwen3.7-plus', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}
payload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\n\n' + text
Path('request.json').write_text(json.dumps(payload, ensure_ascii=False), encoding='utf-8')
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
-H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
result = json.loads(Path('result.json').read_text(encoding='utf-8'))
print(json.dumps(result, ensure_ascii=False, indent=2))
PY_RESULT
import json, os
from pathlib import Path
source_file = Path(os.environ['AILOOT_TEXT_FILE'])
if not source_file.is_file():
raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')
text = source_file.read_text(encoding='utf-8')
if not text.strip():
raise SystemExit('Choose a document containing text')
payload = {'model': 'qwen/qwen3.7-plus', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}
payload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\n\n' + text
from urllib.request import Request, urlopen
from urllib.error import HTTPError
api_key = os.environ['AILOOT_API_KEY']
if not api_key.strip():
raise SystemExit('Set AILOOT_API_KEY before making a request')
headers = {'x-api-key': 'PLACEHOLDER_KEY', 'anthropic-version': '2023-06-01', 'Content-Type': 'application/json'}
headers['x-api-key'] = api_key
request = Request('https://api.ailoot.ai/v1/messages', data=json.dumps(payload, ensure_ascii=False).encode('utf-8'), headers=headers, method='POST')
try:
with urlopen(request, timeout=120) as response:
raw = response.read()
Path('response-headers.txt').write_text(str(response.headers), encoding='utf-8')
except HTTPError as error:
Path('result.json').write_bytes(error.read())
Path('response-headers.txt').write_text(str(error.headers), encoding='utf-8')
raise
Path('result.json').write_bytes(raw)
import json
from pathlib import Path
result = json.loads(Path('result.json').read_text(encoding='utf-8'))
print(json.dumps(result, ensure_ascii=False, indent=2))
Ricevi e salva i risultati
Ailoot Ultra · Anthropic Messages
JSON o SSE
Conserva tutti i risultati completati
Conserva ogni risposta, file e parte di contenuto restituiti per intero.
Conserva tutti i blocchi di contenuto, le firme di ragionamento e gli ID effettivi di utilizzo degli strumenti. Assembla tutti i delta dei blocchi SSE; il primo blocco di testo non è l’uscita completa.
Se occorre verificare la risposta originale
Conserva gli ID e le intestazioni di richiesta/risposta. Non viene fornito alcun URL generico per recuperare un’attività testuale.
Campi della risposta
| Campo | Tipo |
|---|---|
Campoid | Tipostring |
Campomodel | Tipostring |
Campocontent[] | Tipotext|thinking|tool_use|other content block |
Campostop_reason | Tipostring|null |
Campousage | Tipoobject |
Errori e passaggi successivi
| Risposta | Condizione | Passaggio successivo |
|---|---|---|
Risposta400 · invalid_request_error | CondizioneCampi obbligatori, rappresentazione del materiale o valore del parametro non validi | Passaggio successivoCorreggi i campi indicati prima di una nuova richiesta di creazione. |
Alias
Alias del modello
Ailoot qwen3.7-plus, qwen-plus
Ailoot Ultra qwen3.7-plus, qwen/qwen3.7-plus
Alias dei percorsi dei metodi
/chat/completions
ID di chiamata correlati
FAQ · Qwen: Qwen3.7 Plus
- Quali input e risultati sono disponibili?
POST /v1/messages·qwen3.7-plus:text,image→textPOST /v1/responses·qwen3.7-plus:text,image→textPOST /v1/chat/completions·qwen3.7-plus:text,image→textPOST /v1/chat/completions·qwen3.7-plus:text→textPOST /v1/messages·qwen3.7-plus:text→json,ssePOST /v1/messages·qwen-plus:text,image→textPOST /v1/responses·qwen-plus:text,image→textPOST /v1/chat/completions·qwen-plus:text,image→textPOST /v1/chat/completions·qwen/qwen3.7-plus:text→textPOST /v1/messages·qwen/qwen3.7-plus:text→json,sse- Quali campi usa la richiesta?
POST /v1/messages·qwen3.7-plus:model,messages,system,max_tokens,stream,metadataPOST /v1/responses·qwen3.7-plus:model,input,instructions,streamPOST /v1/chat/completions·qwen3.7-plus:model,messages,streamPOST /v1/chat/completions·qwen3.7-plus:model,messages,streamPOST /v1/messages·qwen3.7-plus:model,messages,max_tokens,streamPOST /v1/messages·qwen-plus:model,messages,system,max_tokens,stream,metadataPOST /v1/responses·qwen-plus:model,input,instructions,streamPOST /v1/chat/completions·qwen-plus:model,messages,streamPOST /v1/chat/completions·qwen/qwen3.7-plus:model,messages,stream,modalities,providerPOST /v1/messages·qwen/qwen3.7-plus:model,messages,max_tokens,stream- Quali limiti si applicano?
POST /v1/messages·qwen3.7-plus:ctx:991808;max_out:131072;messages.min_items:1;max_tokens.minimum:1POST /v1/responses·qwen3.7-plus:ctx:991808;max_out:131072POST /v1/chat/completions·qwen3.7-plus:ctx:991808;max_out:131072;messages.min_items:1POST /v1/chat/completions·qwen3.7-plus:messages.min_items:1POST /v1/messages·qwen-plus:ctx:991808;max_out:131072;messages.min_items:1;max_tokens.minimum:1POST /v1/responses·qwen-plus:ctx:991808;max_out:131072POST /v1/chat/completions·qwen-plus:ctx:991808;max_out:131072;messages.min_items:1POST /v1/chat/completions·qwen/qwen3.7-plus:messages.min_items:1