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

# Generic Inference



## OpenAPI

````yaml https://api.dev-sgp.scale.com/openapi-versions/v5/openapi.json post /v5/inference
openapi: 3.1.0
info:
  title: EGP API V5
  description: >-
    This is the parent API for all EGP APIs. If you are looking for the EGP API,
    please go to https://api.egp.scale.com/docs.
  contact:
    name: Scale Generative AI Platform
    url: https://scale.com/genai-platform
  version: 0.1.0
servers:
  - url: https://api.egp.scale.com
security: []
paths:
  /v5/inference:
    post:
      tags:
        - Inference
      summary: Generic Inference
      operationId: POST-V5-/v5/inference
      parameters:
        - name: x-selected-account-id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Account ID Header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenericInferenceRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/GenericInferenceResponse'
                  - $ref: '#/components/schemas/GenericInferenceResponseChunk'
                title: Response Post-V5-/V5/Inference
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    GenericInferenceRequest:
      properties:
        model:
          type: string
          title: Model
          description: model specified as `vendor/name` (ex. openai/gpt-5)
        args:
          title: Args
          description: Arguments passed into model
          additionalProperties: true
          type: object
        inference_configuration:
          $ref: '#/components/schemas/LaunchInferenceConfiguration'
          description: Vendor specific configuration
      type: object
      required:
        - model
      title: GenericInferenceRequest
    GenericInferenceResponse:
      properties:
        object:
          type: string
          const: generic_inference
          title: Object
          default: generic_inference
        response:
          anyOf:
            - additionalProperties: true
              type: object
            - items: {}
              type: array
            - type: string
            - type: integer
            - type: number
            - type: boolean
          title: Response
      type: object
      required:
        - response
    GenericInferenceResponseChunk:
      properties:
        object:
          type: string
          const: generic_inference.chunk
          title: Object
          default: generic_inference.chunk
        response:
          anyOf:
            - additionalProperties: true
              type: object
            - items: {}
              type: array
            - type: string
            - type: integer
            - type: number
            - type: boolean
          title: Response
      type: object
      required:
        - response
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LaunchInferenceConfiguration:
      properties:
        timeout_seconds:
          title: Timeout Seconds
          type: integer
        num_retries:
          title: Num Retries
          type: integer
      type: object
      title: LaunchInferenceConfiguration
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          title: Error Type
          type: string
        input:
          title: Input
        ctx:
          type: object
          title: Context
          additionalProperties: true
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````