Zum Hauptinhalt springen
POST
/
images
/
generations
Ein Bild erstellen
curl --request POST \
  --url https://api.orcarouter.ai/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "openai/gpt-image-1",
  "prompt": "<string>",
  "n": 1,
  "size": "<string>",
  "response_format": "url",
  "user": "<string>"
}
'
{
  "created": 123,
  "data": [
    {
      "url": "<string>",
      "b64_json": "<string>",
      "revised_prompt": "<string>"
    }
  ]
}

Autorisierungen

Authorization
string
header
erforderlich

OrcaRouter-API-Schlüssel sehen aus wie sk-orca-.... Übergib sie im Authorization: Bearer sk-orca-...-Header.

Body

application/json
model
string
erforderlich

Bildgenerierungs-Modell. Die Familien OpenAI / Google Imagen / xAI Grok werden alle auf diesem Endpunkt bedient.

Beispiel:

"openai/gpt-image-1"

prompt
string
erforderlich
n
integer
Standard:1
Erforderlicher Bereich: 1 <= x <= 10
size
string

OpenAI-stil-Größe wie 1024x1024. Für Modelle, die stattdessen Seitenverhältnis verwenden (Gemini Imagen), bildet OrcaRouter 1024x10241:1, 1792x102416:9, usw. ab.

Beispiele:

"1024x1024"

"1792x1024"

"1024x1792"

quality
enum<string>
Verfügbare Optionen:
auto,
standard,
hd,
high,
medium,
low
style
enum<string>
Verfügbare Optionen:
vivid,
natural
response_format
enum<string>
Standard:url
Verfügbare Optionen:
url,
b64_json
user
string

Antwort

200 - application/json

OK

created
integer
data
object[]