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

# Start Python execution

> Start execution and return direct streaming URL.

The client can then connect directly to the streaming_url to receive output.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v2/external/execution/streaming/start
openapi: 3.1.0
info:
  title: Lyceum Cloud API
  version: 0.1.0
servers:
  - url: https://api.lyceum.technology
    description: Production
security:
  - bearerAuth: []
paths:
  /api/v2/external/execution/streaming/start:
    post:
      tags:
        - Python
      summary: Start Python execution
      description: >-
        Start execution and return direct streaming URL.


        The client can then connect directly to the streaming_url to receive
        output.
      operationId: start_streaming_execution_api_v2_external_execution_streaming_start_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StreamingExecutionRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecutionStartResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    StreamingExecutionRequest:
      properties:
        code:
          type: string
          title: Code
        nbcode:
          type: integer
          title: Nbcode
          default: 0
        timeout:
          type: integer
          maximum: 600
          minimum: 1
          title: Timeout
          default: 60
        requirements_content:
          anyOf:
            - type: string
            - type: 'null'
          title: Requirements Content
        prior_imports:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Prior Imports
        kernel_state:
          anyOf:
            - type: string
            - type: 'null'
          title: Kernel State
        import_files:
          anyOf:
            - type: string
            - type: 'null'
          title: Import Files
        file_name:
          anyOf:
            - type: string
            - type: 'null'
          title: File Name
        execution_type:
          type: string
          pattern: ^[a-zA-Z0-9_.]+$
          title: Execution Type
          default: gpu.l40s
        user_callback_urls:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: User Callback Urls
          description: URLs to call with job completion info
      type: object
      required:
        - code
      title: StreamingExecutionRequest
      description: Request model for streaming code execution
    ExecutionStartResponse:
      properties:
        execution_id:
          type: string
          title: Execution Id
        status:
          type: string
          title: Status
        streaming_url:
          type: string
          title: Streaming Url
      type: object
      required:
        - execution_id
        - status
        - streaming_url
      title: ExecutionStartResponse
      description: Response model with direct streaming URL
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Pass an API key (prefixed `lk_`) or a JWT access token as a bearer
        token. Generate API keys in the dashboard at
        https://dashboard.lyceum.technology/api-keys.

````