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

# Generation Result

> Returns a grounded generation task by id.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/grounded-generation/{generation_id}
openapi: 3.1.0
info:
  title: Octen API
  description: >-
    Octen API provides Broad Search, Web Search, Image Search, Video Search,
    Extract, Embeddings, VL Embeddings, Answer, and Deep Research services. The
    Web Search API searches ranked web results with optional filters,
    highlights, and full content. The Image Search API searches for images from
    a text query or an image, with an optional design mode that returns a
    structured summary and a reusable HTML snippet for each result. The Video
    Search API searches for videos from a text query. The Broad Search API
    decomposes a query into multiple sub-queries, searches them in parallel, and
    returns results grouped by sub-query. The Extract API extracts clean content
    from URLs, with optional query-focused highlights, page classification, and
    multimedia resources. The Embeddings API converts text into vector
    representations. The VL Embeddings API converts multimodal inputs into
    vector representations. The Answer API decomposes queries into multiple
    sub-queries for comprehensive search and synthesis. The Deep Research API
    runs a multi-round adaptive research pipeline that produces a structured
    research plan, executes iterative searches, and streams a final long-form
    report.
  version: 1.0.0
servers:
  - url: https://api.octen.ai
security:
  - bearerAuth: []
  - apiKeyAuth: []
paths:
  /v1/grounded-generation/{generation_id}:
    get:
      summary: Get a generation result
      description: Returns a grounded generation task by id.
      operationId: get-grounded-generation
      parameters:
        - name: generation_id
          in: path
          required: true
          schema:
            type: string
          example: mm-3ca3c4ff37c546b6b59f2e9cde09f2f6
          description: The task id returned by the Grounded Generation API.
      responses:
        '200':
          description: Successful grounded generation task response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroundedGenerationTask'
              example:
                request_id: 20260924021635985E9WHYPV4FI
                generation_id: mm-3ca3c4ff37c546b6b59f2e9cde09f2f6
                modality: image
                status: succeeded
                output_url: >-
                  https://apt-multimodal-output.octen.ai/apt-multimodal-output/images%2F2026_09_24%2Fmm-3ca3c4ff37c546b6b59f2e9cde09f2f6.jpg?se=...&sig=...
                references:
                  - source_id: source1
                    url: >-
                      https://upload.wikimedia.org/wikipedia/commons/2/26/Cristiano_Ronaldo_2026.jpg
                    title: Cristiano Ronaldo - Wikipedia
                    cover_url: https://encrypted-tbn0.gstatic.com/images?q=tbn:...
                search_results:
                  - query: Cristiano Ronaldo
                    results:
                      - type: image
                        title: Cristiano Ronaldo - Wikipedia
                        url: >-
                          https://upload.wikimedia.org/wikipedia/commons/2/26/Cristiano_Ronaldo_2026.jpg
                        source_page: https://en.wikipedia.org/wiki/Cristiano_Ronaldo
                        description: en.wikipedia.org
                        cover_url: https://encrypted-tbn0.gstatic.com/images?q=tbn:...
                created_at: 1790215572
                updated_at: 1790215601
                usage:
                  image_count: 1
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: >-
            Task not found or expired — Returned when the generation id does not
            exist or is older than 7 days.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 404
                msg: Task not found or expired.
                request_id: req_abc123def456
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    GroundedGenerationTask:
      type: object
      required:
        - generation_id
        - modality
        - status
        - created_at
        - updated_at
      properties:
        request_id:
          type: string
          description: Unique identifier for the request.
        generation_id:
          type: string
          description: Unique task id.
        modality:
          type: string
          enum:
            - image
            - video
          description: The type of output this task generates.
        status:
          type: string
          enum:
            - queued
            - running
            - succeeded
            - failed
          description: Task state.
        output_url:
          type: string
          description: >-
            Signed download URL for the output, present when `status` is
            `succeeded`. Requires no API key, and is valid for 7 days after the
            task was created.
        references:
          type: array
          items:
            $ref: '#/components/schemas/GroundedGenerationReference'
          description: The reference material used to generate the output.
        search_results:
          type: array
          items:
            $ref: '#/components/schemas/GroundedGenerationSearchGroup'
          description: >-
            The search results the references were selected from, grouped by
            query.
        error:
          $ref: '#/components/schemas/GroundedGenerationError'
        created_at:
          type: integer
          description: Unix timestamp in seconds when the task was created.
        updated_at:
          type: integer
          description: Unix timestamp in seconds when the task was last updated.
        usage:
          $ref: '#/components/schemas/GroundedGenerationUsage'
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
          description: Business status code. Non-zero values indicate an error.
        msg:
          type: string
          description: A message describing the error.
        request_id:
          type: string
          description: Unique identifier for the request.
      required:
        - code
        - msg
        - request_id
    GroundedGenerationReference:
      type: object
      description: A single piece of reference material.
      properties:
        source_id:
          type: string
          description: Identifier of the reference, such as `source1`.
        url:
          type: string
          description: The media URL.
        title:
          type: string
          description: The title of the reference.
        cover_url:
          type: string
          description: Thumbnail URL.
    GroundedGenerationSearchGroup:
      type: object
      description: The results for one search query.
      properties:
        query:
          type: string
          description: The query the task searched for.
        results:
          type: array
          items:
            $ref: '#/components/schemas/GroundedGenerationSearchResult'
          description: Results for this query.
    GroundedGenerationError:
      type: object
      description: >-
        Failure reason, present when `status` is `failed`. Failed tasks are not
        billed.
      properties:
        code:
          type: string
          enum:
            - MM_GENERATION_CONTENT_POLICY
            - MM_GENERATION_INPUT_IMAGE_PRIVACY_BLOCKED
            - MM_GENERATION_CONTENT_NOT_SUPPORTED
            - MM_GENERATION_NO_REFERENCE_MATERIAL
            - MM_GENERATION_REJECTED
            - MM_GENERATION_TIMEOUT
            - MM_GENERATION_FAILED
          description: >-
            Machine-readable failure code. `MM_GENERATION_CONTENT_POLICY`: the
            prompt triggered a content policy;
            `MM_GENERATION_INPUT_IMAGE_PRIVACY_BLOCKED`: the reference material
            was blocked for privacy; `MM_GENERATION_CONTENT_NOT_SUPPORTED`: the
            content is not supported; `MM_GENERATION_NO_REFERENCE_MATERIAL`: no
            usable reference material was found; `MM_GENERATION_REJECTED`: the
            model rejected the request; `MM_GENERATION_TIMEOUT`: generation
            timed out, retry; `MM_GENERATION_FAILED`: generation failed for
            another reason, retry.
        message:
          type: string
          description: A message describing the failure.
    GroundedGenerationUsage:
      type: object
      description: Metering for the task. Present only when `status` is `succeeded`.
      properties:
        image_count:
          type: integer
          description: Number of images generated. Returned when `modality` is `image`.
        video_count:
          type: integer
          description: Number of videos generated. Returned when `modality` is `video`.
        video_seconds:
          type: integer
          description: >-
            Length of the generated video in seconds. Returned when `modality`
            is `video`.
    GroundedGenerationSearchResult:
      type: object
      description: A single search result.
      properties:
        type:
          type: string
          enum:
            - image
            - video
          description: Media type of the result.
        title:
          type: string
          description: The title of the result.
        url:
          type: string
          description: The media URL.
        source_page:
          type: string
          description: URL of the original page hosting the media.
        description:
          type: string
          description: Description of the result.
        cover_url:
          type: string
          description: Thumbnail URL.
  responses:
    Unauthorized:
      description: Invalid API Key — Returned when the API key is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 401
            msg: Invalid API Key
            request_id: req_abc123def456
    RateLimited:
      description: >-
        Exceeding the rate limit — Returned when the request exceeds the
        configured rate limit.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 429
            msg: Exceeding the rate limit
            request_id: req_abc123def456
    InternalError:
      description: Internal error — Returned when an unexpected server-side error occurs.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 500
            msg: Internal error
            request_id: req_abc123def456
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token used for request authentication. Alternatively, you can
        send the API key in the `x-api-key` header. Note: A payment method is
        required to use the API.
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key used for request authentication. Alternatively, you can send the
        key as a Bearer token in the `Authorization` header. Note: A payment
        method is required to use the API.

````