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

# Get job logs

> Combined stdout and stderr as ordered chunks. Pass the returned `cursor` back as `after` to read only newer output; stop when `done` is true. Logs are capped at 10 MB per job (the first 5 MB and the newest output are kept) and kept 30 days after the job ends.



## OpenAPI

````yaml /api-reference/openapi.json get /jobs/{id}/logs
openapi: 3.1.0
info:
  title: Runcrate API
  version: 1.0.0
  summary: OpenAI-compatible inference API + GPU infrastructure API.
  description: >-
    Runcrate exposes two API surfaces. The inference API at
    `https://api.runcrate.ai/v1` is OpenAI-compatible: it accepts the standard
    OpenAI SDK with the base URL changed. The infrastructure API at
    `https://www.runcrate.ai/api/v1` manages GPU instances, jobs, persistent
    volumes, environments, SSH keys, templates, and billing. Both share a single
    `rc_live_*` API key.


    Pricing is per-token, per-image, per-second, or per-minute on the inference
    API (varies by model; see https://www.runcrate.ai/api/models/catalog for
    live rates) and per-second on GPU rentals (see
    https://www.runcrate.ai/pricing for hourly rates per GPU class).


    All infrastructure API responses are wrapped in `{ "data": ... }`. List
    responses also include a `meta` object with pagination cursors. Error
    responses use `{ "error": { "code": "...", "message": "..." } }`.
  termsOfService: https://www.runcrate.ai/terms
  contact:
    name: Runcrate
    url: https://www.runcrate.ai/contact
  license:
    name: Proprietary
    url: https://www.runcrate.ai/terms
servers:
  - url: https://api.runcrate.ai/v1
    description: Inference API (OpenAI-compatible)
  - url: https://www.runcrate.ai/api/v1
    description: >-
      Infrastructure API (instances, jobs, storage, environments, ssh-keys,
      templates, billing)
security:
  - ApiKeyAuth: []
tags:
  - name: Chat
    description: OpenAI-compatible chat completions.
  - name: Images
    description: Text-to-image generation.
  - name: Videos
    description: Async text-to-video and image-to-video generation.
  - name: Audio
    description: Text-to-speech and speech-to-text.
  - name: Embeddings
    description: Vector embeddings for RAG and search.
  - name: Models
    description: Model catalog discovery.
  - name: Instances
    description: GPU instance lifecycle.
  - name: Jobs
    description: >-
      Run one command on its own GPU machine. The machine stops, and billing
      ends, when the command exits.
  - name: Schedules
    description: >-
      Start an instance or a job later: once at a set time, or on a repeating
      cron schedule in your timezone.
  - name: Storage
    description: Persistent volume management.
  - name: Environments
    description: Resource isolation containers within a workspace.
  - name: Secrets
    description: >-
      Names of the secrets an environment's machines get. Values are set in the
      dashboard and never returned.
  - name: SSH Keys
    description: SSH key management for instance access.
  - name: Templates
    description: Pre-built instance images and configurations.
  - name: Billing
    description: Credit balance, transactions, usage metrics.
paths:
  /jobs/{id}/logs:
    servers:
      - url: https://www.runcrate.ai/api/v1
    get:
      tags:
        - Jobs
      summary: Get job logs
      description: >-
        Combined stdout and stderr as ordered chunks. Pass the returned `cursor`
        back as `after` to read only newer output; stop when `done` is true.
        Logs are capped at 10 MB per job (the first 5 MB and the newest output
        are kept) and kept 30 days after the job ends.
      operationId: getJobLogs
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: after
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
          description: Return chunks after this cursor.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 500
          description: Maximum chunks.
        - name: follow
          in: query
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            When there is nothing new and the job has not ended, wait up to 25
            seconds for output or the end.
      responses:
        '200':
          description: Log chunks.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/JobLogs'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    JobLogs:
      type: object
      required:
        - job_id
        - status
        - chunks
        - cursor
        - truncated
        - done
      properties:
        job_id:
          type: string
        status:
          type: string
          enum:
            - queued
            - starting
            - running
            - succeeded
            - failed
            - cancelled
            - timed_out
        chunks:
          type: array
          items:
            $ref: '#/components/schemas/JobLogChunk'
          description: In order. At most about 1 MB of text per response.
        cursor:
          type: integer
          description: Pass back as `after` to read only newer output.
        truncated:
          type: boolean
          description: >-
            True when the log passed 10 MB: the first 5 MB and the newest output
            are kept, and a marker chunk marks the gap.
        done:
          type: boolean
          description: >-
            True when the job has ended and every chunk has been read. Stop
            polling.
    JobLogChunk:
      type: object
      required:
        - seq
        - ts
        - text
      properties:
        seq:
          type: integer
          nullable: true
          description: >-
            Position in the log. Null only on the marker chunk that stands where
            truncated output was dropped.
        ts:
          type: string
          format: date-time
          nullable: true
        text:
          type: string
          description: >-
            A raw fragment of combined stdout and stderr, not a line. Print as
            is.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: >-
                Machine-readable error code (e.g. `validation_error`,
                `unauthorized`, `not_found`, `insufficient_credits`,
                `rate_limited`, `internal_error`).
            message:
              type: string
              description: Human-readable error message.
            details:
              type: object
              additionalProperties: true
              description: Optional structured error context.
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Use a Runcrate API key with the `rc_live_*` prefix as the bearer token.
        Create one at https://www.runcrate.ai/dashboard/api-keys.

````

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