Chat

Create chat completion

Creates a model response for the given chat conversation. Supports streaming via SSE.

post/chat/completions

Request

  • Base URL
    https://www.aimagicx.com/api/v1
  • Auth
    HTTP bearer

Request body

modelstring

Model ID to use

temperaturenumber

Sampling temperature (0-2)

max_tokensinteger

Maximum tokens to generate

streamboolean

Enable SSE streaming

web_searchboolean

Enable web search grounding

Example request

{
  "model": "openai/gpt-4o"
}

Response

Successful response

idstring

Unique completion ID

object'chat.completion'
createdinteger

Unix timestamp

modelstring

Model used

model_tier'fast' | 'standard' | 'premium'

Changes

No recorded changes to this operation across all 1 revision of this API.