AIMLAPI · Schema

ChatCompletionRequest

Request body for creating a chat completion via AIMLAPI

Artificial IntelligenceMachine-LearningAI ModelsLLMImage-GenerationVideo GenerationSpeechEmbeddingsAPI GatewayDeveloper Tools

Properties

Name Type Description
model string Model ID to use for completion
messages array List of messages in the conversation
temperature number Sampling temperature 0-2
max_tokens integer Maximum tokens to generate
stream boolean Stream response tokens
top_p number Nucleus sampling parameter
frequency_penalty number Frequency penalty -2 to 2
presence_penalty number Presence penalty -2 to 2
View JSON Schema on GitHub

JSON Schema

aimlapi-chat-completion-request-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/aimlapi/refs/heads/main/json-schema/aimlapi-chat-completion-request-schema.json",
  "title": "ChatCompletionRequest",
  "description": "Request body for creating a chat completion via AIMLAPI",
  "type": "object",
  "properties": {
    "model": {
      "type": "string",
      "description": "Model ID to use for completion",
      "example": "gpt-4o"
    },
    "messages": {
      "type": "array",
      "description": "List of messages in the conversation",
      "items": {
        "type": "object"
      }
    },
    "temperature": {
      "type": "number",
      "description": "Sampling temperature 0-2",
      "example": 0.7
    },
    "max_tokens": {
      "type": "integer",
      "description": "Maximum tokens to generate",
      "example": 1024
    },
    "stream": {
      "type": "boolean",
      "description": "Stream response tokens",
      "example": false
    },
    "top_p": {
      "type": "number",
      "description": "Nucleus sampling parameter",
      "example": 1.0
    },
    "frequency_penalty": {
      "type": "number",
      "description": "Frequency penalty -2 to 2",
      "example": 0
    },
    "presence_penalty": {
      "type": "number",
      "description": "Presence penalty -2 to 2",
      "example": 0
    }
  }
}