> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rimp.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Chat completion (synchronous)

> Synchronous LLM chat completion across GPT-5, Claude, Gemini, Llama, DeepSeek, Mistral, Qwen and Grok. Credits are charged per output token (reconciled on completion).



## OpenAPI

````yaml /api-reference/openapi.json post /v1/chat
openapi: 3.1.0
info:
  title: Rimp API
  version: 1.0.0
  description: >-
    AI generation API across 8 modalities — image, video, voice, music, avatar,
    chat, 3D and upscale. Multi-model side-by-side comparisons, unified billing,
    one API key.
servers:
  - url: https://api.rimp.io
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/chat:
    post:
      summary: Chat completion (synchronous)
      description: >-
        Synchronous LLM chat completion across GPT-5, Claude, Gemini, Llama,
        DeepSeek, Mistral, Qwen and Grok. Credits are charged per output token
        (reconciled on completion).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - messages
              properties:
                model:
                  type: string
                messages:
                  type: array
                  minItems: 1
                  maxItems: 50
                  items:
                    type: object
                    required:
                      - role
                      - content
                    properties:
                      role:
                        type: string
                        enum:
                          - system
                          - user
                          - assistant
                      content:
                        type: string
                        maxLength: 50000
                max_tokens:
                  type: integer
                  minimum: 1
                  maximum: 8000
                temperature:
                  type: number
                  minimum: 0
                  maximum: 2
                system_prompt:
                  type: string
                  maxLength: 8000
      responses:
        '200':
          description: Completion returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletion'
        '402':
          description: Insufficient credits.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ChatCompletion:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - chat.completion
        status:
          type: string
          enum:
            - succeeded
            - failed
        modality:
          type: string
          enum:
            - chat
        message:
          type: object
          properties:
            role:
              type: string
              enum:
                - assistant
            content:
              type: string
        charged_credits:
          type: integer
        refunded_credits:
          type: integer
        error_message:
          type: string
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
            code:
              type: string
            message:
              type: string
            param:
              type: string
            request_id:
              type: string
          required:
            - type
            - code
            - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````