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

# Get File Blueprint

> Retrieve a file blueprint by id.

Retrieve a file blueprint by ID.

<RequestExample>
  ```python Python theme={null}
  from retab import Retab

  client = Retab()

  blueprint = client.files.get_blueprint("fbp_a1b2c3d4e5f6")

  print(blueprint.status)
  ```

  ```typescript TypeScript theme={null}
  import { Retab } from "@retab/node";

  const client = new Retab({ apiKey: process.env.RETAB_API_KEY });

  const blueprint = await client.files.get_blueprint("fbp_a1b2c3d4e5f6");

  console.log(blueprint.status);
  ```

  ```go Go theme={null}
  package main

  import (
  	"context"
  	"fmt"
  	"log"

  	retab "github.com/retab-dev/retab/clients/go"
  )

  func main() {
  	client, err := retab.NewClient("")
  	if err != nil {
  		log.Fatal(err)
  	}

  	blueprint, err := client.Files.GetBlueprint(context.Background(), "fbp_a1b2c3d4e5f6", &retab.FilesGetBlueprintParams{})
  	if err != nil {
  		log.Fatal(err)
  	}

  	fmt.Println(*blueprint.Status)
  }
  ```

  ```java Java theme={null}
  import com.retab.RetabClient;

  public final class Example {
    public static void main(String[] args) throws Exception {
      RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));

      var blueprint = client.files().getBlueprint("fbp_a1b2c3d4e5f6", true);

      System.out.println(blueprint.getId());
    }
  }
  ```

  ```rust Rust theme={null}
  use retab::resources::files::GetBlueprintParams;
  use retab::Retab;

  #[tokio::main]
  async fn main() -> Result<(), Box<dyn std::error::Error>> {
      let client = Retab::new(std::env::var("RETAB_API_KEY")?);

      let blueprint = client
          .files()
          .get_blueprint("fbp_a1b2c3d4e5f6", GetBlueprintParams::default())
          .await?;

      println!("{}", blueprint.id);
      Ok(())
  }
  ```

  ```csharp C# theme={null}
  using Retab;
  using RetabClient = Retab.Retab;

  var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
  var client = new RetabClient(apiKey);

  var blueprint = await client.Files.GetBlueprintAsync("fbp_a1b2c3d4e5f6");

  Console.WriteLine(blueprint.Id);
  ```

  ```php PHP theme={null}
  <?php
  require 'vendor/autoload.php';

  use Retab\Client;

  $client = new Client(apiKey: getenv('RETAB_API_KEY'));

  $blueprint = $client->files()->getBlueprint('fbp_a1b2c3d4e5f6');

  echo $blueprint->id;
  ```

  ```ruby Ruby theme={null}
  require 'retab'

  client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])

  blueprint = client.files.get_blueprint(blueprint_id: 'fbp_a1b2c3d4e5f6')

  puts blueprint.id
  ```

  ```curl cURL theme={null}
  curl \
    'https://api.retab.com/v1/files/blueprints/fbp_a1b2c3d4e5f6' \
    -H "Authorization: Bearer $RETAB_API_KEY"
  ```
</RequestExample>


## OpenAPI

````yaml GET /v1/files/blueprints/{blueprint_id}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.retab.com
security: []
paths:
  /v1/files/blueprints/{blueprint_id}:
    get:
      tags:
        - Files
        - File Blueprints
      summary: Get File Blueprint
      description: Retrieve a file blueprint by id.
      operationId: get_file_blueprint
      parameters:
        - in: path
          name: blueprint_id
          required: true
          schema:
            type: string
            title: Blueprint Id
        - description: >-
            When false, returns a cheap status-only projection (no output),
            served from cache for in-flight background runs.
          in: query
          name: include_output
          schema:
            type: boolean
            description: >-
              When false, returns a cheap status-only projection (no output),
              served from cache for in-flight background runs.
            default: true
            title: Include Output
          required: false
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileBlueprint'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    FileBlueprint:
      properties:
        object:
          type: string
          const: file.blueprint
          title: Object
          default: file.blueprint
        id:
          type: string
          title: Id
          description: Unique identifier of the file blueprint.
        file:
          $ref: '#/components/schemas/FileRef'
          description: Information about the analyzed file.
        intent:
          anyOf:
            - type: string
            - type: 'null'
          title: Intent
          description: User intent supplied with the blueprint request.
        output:
          additionalProperties: true
          type: object
          title: Output
          description: The generated Document Blueprint payload.
          default: {}
        status:
          type: string
          enum:
            - pending
            - queued
            - in_progress
            - completed
            - failed
            - cancelled
          title: Status
          description: >-
            Lifecycle status. The synchronous path returns 'completed'.
            Background runs progress pending -> queued -> in_progress ->
            completed | failed | cancelled.
          default: pending
        error:
          anyOf:
            - $ref: '#/components/schemas/PrimitiveError'
            - type: 'null'
          description: >-
            Error details when a background run fails; null otherwise. Always
            present so consumers can read it without an existence check.
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        mode:
          anyOf:
            - type: string
              enum:
                - instant
                - reasoning
            - type: 'null'
          title: Mode
      type: object
      required:
        - file
        - id
      title: FileBlueprint
      description: A document blueprint generated from an uploaded file.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
          default: []
      type: object
      title: HTTPValidationError
    FileRef:
      properties:
        id:
          type: string
          title: Id
          description: ID of the file
        filename:
          type: string
          title: Filename
          description: Filename of the file
        mime_type:
          type: string
          title: Mime Type
          description: MIME type of the file
      type: object
      required:
        - filename
        - id
        - mime_type
      title: FileRef
      description: Public/shared file reference used across SDK and customer-facing APIs.
    PrimitiveError:
      properties:
        code:
          type: string
          title: Code
          description: Machine-readable error code.
        message:
          type: string
          title: Message
          description: Human-readable error message.
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: Optional structured error context.
      type: object
      required:
        - code
        - message
      title: PrimitiveError
    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
          default: null
        ctx:
          type: object
          title: Context
          default: {}
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````