Cloudflare · JSON Structure

Cloudflare Workers Ai Chat Completion Request Structure

Type: object Properties: 6
AI GatewayAPI GatewayArtificial IntelligenceCDNCloudContainersDDoS ProtectionDNSEdgeEdge ComputingObject StoragePlatformReal-Time CommunicationSecurityServerlessWeb Performance

ChatCompletionRequest is a JSON Structure definition published by Cloudflare, describing 6 properties. It conforms to the https://json-structure.org/draft/2020-12/schema meta-schema.

Properties

model messages max_tokens temperature top_p stream

Meta-schema: https://json-structure.org/draft/2020-12/schema

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/draft/2020-12/schema",
  "name": "ChatCompletionRequest",
  "type": "object",
  "properties": {
    "model": {
      "type": "string"
    },
    "messages": {
      "type": "array"
    },
    "max_tokens": {
      "type": "integer"
    },
    "temperature": {
      "type": "number"
    },
    "top_p": {
      "type": "number"
    },
    "stream": {
      "type": "boolean"
    }
  }
}