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

# Make a prediction



## OpenAPI

````yaml post /predictions
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /predictions:
    post:
      tags:
        - predictions
      summary: Create Prediction
      operationId: create_prediction_predictions_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PredictionRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PredictionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
        - APIKeyHeader: []
components:
  schemas:
    PredictionRequest:
      properties:
        series_id:
          anyOf:
            - type: string
          title: Series Id
        ai_model_id:
          type: string
          title: Ai Model Id
        series:
          anyOf:
            - items:
                $ref: '#/components/schemas/SeriesItem'
              type: array
          title: Series
        is_async:
          type: boolean
          title: Is Async
          default: false
        fine_tuning_epochs:
          anyOf:
            - type: integer
          title: Fine Tuning Epochs
      type: object
      required:
        - ai_model_id
      title: PredictionRequest
    PredictionResponse:
      properties:
        id:
          type: string
          title: Id
        ai_model_id:
          type: string
          title: Ai Model Id
        status:
          $ref: '#/components/schemas/PredictionStatus'
        input_series:
          anyOf:
            - items:
                $ref: '#/components/schemas/SeriesItem'
              type: array
          title: Input Series
        prediction_series:
          anyOf:
            - items:
                $ref: '#/components/schemas/SeriesItem'
              type: array
          title: Prediction Series
        input_series_id:
          type: string
          title: Input Series Id
        prediction_series_id:
          anyOf:
            - type: string
          title: Prediction Series Id
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - ai_model_id
        - status
        - input_series
        - prediction_series
        - input_series_id
        - prediction_series_id
        - created_at
      title: PredictionResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SeriesItem:
      properties:
        timestamp:
          type: string
          format: date-time
          title: Timestamp
        value:
          type: number
          title: Value
        metadata:
          type: object
          title: Metadata
      type: object
      required:
        - timestamp
        - value
      title: SeriesItem
    PredictionStatus:
      type: string
      enum:
        - QUEUED
        - IN_PROGRESS
        - COMPLETED
        - FAILED
      title: PredictionStatus
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.