Vai al contenuto principale
POST
/
v1beta
/
models
/
{model_path}
curl --request POST \
  --url https://api.orcarouter.ai/v1beta/models/{model_path} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "contents": [
    {
      "role": "user",
      "parts": [
        {
          "text": "Write a one-sentence haiku about the sea."
        }
      ]
    }
  ]
}
'
{}

Autorizzazioni

Authorization
string
header
obbligatorio

Le chiavi API di OrcaRouter hanno la forma sk-orca-.... Passale nell'header Authorization: Bearer sk-orca-....

Parametri del percorso

model_path
string
obbligatorio

Corpo

application/json

Request body nativo di Gemini (forma GenerateContentRequest di Google). Vedi gli esempi per i payload comuni.

Risposta

Risposta riuscita. Per :generateContent il body è JSON (GenerateContentResponse). Per :streamGenerateContent il body è SSE (text/event-stream); ogni evento è un GenerateContentResponse parziale.

GenerateContentResponse nativo di Gemini.