Source of truth

Use these base settings for all examples unless a page says otherwise:
ItemValue
Raw API basehttps://llm.ai-nebula.com
OpenAI SDK basehttps://llm.ai-nebula.com/v1
Auth headerAuthorization: Bearer <NEBULA_API_KEY>
Current availabilityRun GET /v1/models with your API key
Model IDs can share a provider name while requiring different endpoints or request parameters. Treat the model catalog and this routing table as the first step before copying an example.

Endpoint routing matrix

CapabilityModel familyRecommended endpointPayload shapeNotes
Text chatOpenAI-compatible chat models, Qwen, GLM, DeepSeek, Kimi, Grok, many Gemini/Claude models verified for chatPOST /v1/chat/completionsOpenAI ChatUse a minimal payload first. Optional params such as temperature and max_tokens are model-specific.
Text reasoningGPT-5, GPT-5 Pro, o-seriesPOST /v1/responsesOpenAI ResponsesRequired/preferred for GPT-5 pro family and reasoning controls. Use max_output_tokens.
Claude nativeClaude modelsPOST /v1/messagesAnthropic MessagesPreferred for Claude-native clients and full Anthropic features. Some Claude models reject chat temperature.
Claude token countClaude modelsPOST /v1/messages/count_tokensAnthropic token countEstimates input tokens before a Messages request.
Gemini native textGemini text modelsPOST /v1beta/models/{model}:generateContentGemini contents[].parts[]Use for Gemini-specific fields, native streaming, and provider-native compatibility.
OpenAI embeddingstext-embedding-3-small, text-embedding-3-large, text-embedding-ada-002POST /v1/embeddingsOpenAI EmbeddingsVerified working embedding route.
Gemini embeddingsgemini-embedding-001Not recommended until verifiedGemini native embeddingLatest audit returned HTTP 400 for the documented native shape. Use /v1/embeddings models for now.
RerankRerank models available to your keyPOST /v1/rerankNebula rerankConfirm model availability with GET /v1/models.
Image generationGPT Image, Gemini image / Nano Banana, Doubao Seedream/Seededit, Qwen Image, Imagen, Minimax imagePOST /v1/images/generationsProvider-specific image bodySame endpoint, different body per provider. Do not reuse one model family’s payload for another.
Video generationSora, Veo, Wanxiang, Seedance, HappyHorse, Minimax video where availablePOST /v1/video/generationsProvider-specific async bodySubmit task, poll GET /v1/video/generations/{task_id}. i2v/r2v modes require media inputs.
GPT Realtime v1gpt-realtime, gpt-realtime-miniwss://llm.ai-nebula.com/v1/realtime?model={model}OpenAI Realtime v1 eventsSession update uses session.modalities.
GPT Realtime v2gpt-realtime-2wss://llm.ai-nebula.com/v1/realtime?model=gpt-realtime-2OpenAI Realtime v2 eventsSession update uses session.type: "realtime"; do not send v1 modalities.
Gemini Livegemini-live-2.5-flash-native-audiowss://llm.ai-nebula.com/ws/v1beta/models/{model}/liveStreamGemini Live WebSocketSend setup first. Verify live behavior with the tested scripts before production use.
Audio speechgpt-4o-mini-ttsPOST /v1/audio/speechOpenAI audio speechReturns binary audio.

Safe starting payloads

Chat Completions

{
  "model": "qwen-plus",
  "messages": [
    { "role": "user", "content": "Reply with exactly: ok" }
  ]
}

Responses API

{
  "model": "gpt-5.2",
  "max_output_tokens": 64,
  "input": [
    { "role": "user", "content": "Reply with exactly: ok" }
  ]
}

Claude Messages

{
  "model": "claude-sonnet-4-5-20250929",
  "max_tokens": 64,
  "messages": [
    { "role": "user", "content": "Reply with exactly: ok" }
  ]
}

Gemini Native

{
  "contents": [
    {
      "role": "user",
      "parts": [{ "text": "Reply with exactly: ok" }]
    }
  ],
  "generationConfig": { "maxOutputTokens": 64 }
}

Rules of thumb

  • Check GET /v1/models before using a model ID.
  • Start with the minimal payload, then add optional parameters one by one.
  • Do not assume temperature, max_tokens, media fields, or search tools work across all providers.
  • For generated media, follow the provider-specific request body on the image or video page.
  • For WebSocket APIs, use a WebSocket client/Postman WebSocket mode, not normal HTTP send.