TrueFoundry · Capability

TrueFoundry AI Gateway API — Chat

TrueFoundry AI Gateway API — Chat. 1 operations. Lead operation: Create Chat Completion. Self-contained Naftiko capability covering one Truefoundry business surface.

Run with Naftiko TruefoundryChat

What You Can Do

POST
Createchatcompletion — Create Chat Completion
/v1/chat/completions

MCP Tools

create-chat-completion

Create Chat Completion

Capability Spec

ai-gateway-chat.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: TrueFoundry AI Gateway API — Chat
  description: 'TrueFoundry AI Gateway API — Chat. 1 operations. Lead operation: Create Chat Completion. Self-contained Naftiko
    capability covering one Truefoundry business surface.'
  tags:
  - Truefoundry
  - Chat
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    TRUEFOUNDRY_API_KEY: TRUEFOUNDRY_API_KEY
capability:
  consumes:
  - type: http
    namespace: ai-gateway-chat
    baseUri: https://app.truefoundry.com/api/llm
    description: TrueFoundry AI Gateway API — Chat business capability. Self-contained, no shared references.
    resources:
    - name: chat-completions
      path: /chat/completions
      operations:
      - name: createchatcompletion
        method: POST
        description: Create Chat Completion
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: x-tfy-metadata
          in: header
          type: string
          description: Optional metadata JSON string for request logging
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.TRUEFOUNDRY_API_KEY}}'
  exposes:
  - type: rest
    namespace: ai-gateway-chat-rest
    port: 8080
    description: REST adapter for TrueFoundry AI Gateway API — Chat. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/chat/completions
      name: chat-completions
      description: REST surface for chat-completions.
      operations:
      - method: POST
        name: createchatcompletion
        description: Create Chat Completion
        call: ai-gateway-chat.createchatcompletion
        with:
          x-tfy-metadata: rest.x-tfy-metadata
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: ai-gateway-chat-mcp
    port: 9090
    transport: http
    description: MCP adapter for TrueFoundry AI Gateway API — Chat. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: create-chat-completion
      description: Create Chat Completion
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: ai-gateway-chat.createchatcompletion
      with:
        x-tfy-metadata: tools.x-tfy-metadata
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.