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

# Quote an inference request



## OpenAPI

````yaml /gateway-reference/openapi.yaml post /v1/quotes
openapi: 3.1.0
info:
  title: Tulip Gateway API
  version: 2.0.0
  description: >-
    Offer-aware model discovery, quotes, OpenAI-compatible inference, provider
    onboarding, and settlement for Tulip v1 model markets.
servers: []
security: []
tags:
  - name: Service
  - name: Models
  - name: Inference
  - name: Providers
  - name: Settlement
paths:
  /v1/quotes:
    post:
      tags:
        - Inference
      summary: Quote an inference request
      operationId: createQuote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatRequest'
      responses:
        '200':
          description: Offer-specific maximum credit quote.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Quote'
        '503':
          $ref: '#/components/responses/Error'
      security:
        - TulipApiKey: []
components:
  schemas:
    ChatRequest:
      type: object
      properties:
        model:
          type: string
        offer:
          $ref: '#/components/schemas/Hex32'
        messages:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/ChatMessage'
        max_tokens:
          type: integer
          minimum: 1
        max_completion_tokens:
          type: integer
          minimum: 1
        temperature:
          type: number
        top_p:
          type: number
        stop:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        stream:
          type: boolean
        tools:
          type: array
          items: {}
        tool_choice: {}
        response_format: {}
        seed:
          type: integer
        user:
          type: string
      required:
        - model
        - messages
      additionalProperties: true
    Quote:
      type: object
      properties:
        quote_id:
          $ref: '#/components/schemas/Hex32'
        model:
          type: string
        model_id:
          $ref: '#/components/schemas/Hex32'
        offer_id:
          $ref: '#/components/schemas/Hex32'
        tariff_version:
          type: string
        input_tokens:
          type: string
        max_output_tokens:
          type: string
        wakes_endpoint:
          type: boolean
        maximum_credits:
          type: string
        expires_at:
          type: integer
      required:
        - quote_id
        - model
        - model_id
        - offer_id
        - tariff_version
        - input_tokens
        - max_output_tokens
        - wakes_endpoint
        - maximum_credits
        - expires_at
    Hex32:
      type: string
      pattern: ^0x[0-9a-fA-F]{64}$
    ChatMessage:
      type: object
      properties:
        role:
          type: string
          enum:
            - system
            - developer
            - user
            - assistant
            - tool
            - function
        content: {}
      required:
        - role
        - content
      additionalProperties: true
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            type:
              type: string
            message:
              type: string
          required:
            - code
            - type
            - message
      required:
        - error
  responses:
    Error:
      description: Tulip error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    TulipApiKey:
      type: http
      scheme: bearer
      bearerFormat: Tulip API key

````