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

# Optimization Analysis



## OpenAPI

````yaml https://registry.scalar.com/@profound/apis/external-api/latest/openapi.json?variant=processed get /v1/content/{asset_id}/optimization/{content_id}
openapi: 3.1.0
info:
  title: External API
  version: 0.60.2
  x-scalar-sdk-installation:
    - lang: Python
      description: |-
        ```sh
        pip install profound
        ```
    - lang: TypeScript
      description: |-
        ```sh
        npm install @profoundai/client
        ```
    - lang: Rust
      description: |-
        ```sh
        cargo add profound
        ```
servers:
  - url: https://api.tryprofound.com
    description: Production Server
security:
  - APIKeyHeader:
      - X-API-Key
  - BearerAuth: []
paths:
  /v1/content/{asset_id}/optimization/{content_id}:
    get:
      tags:
        - Content
        - beta
        - Content optimization
      summary: Optimization Analysis
      operationId: >-
        optimization_analysis_v1_content__asset_id__optimization__content_id__get
      parameters:
        - name: asset_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Asset Id
        - name: content_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Content Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentOptimizationAnalysisResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - BearerAuth: []
      x-codeSamples:
        - label: Python
          lang: Python
          source: |-
            import os

            from profound import Profound

            client = Profound(
                api_key=os.environ.get("PROFOUND_API_KEY"),
            )

            optimization = client.content.optimization.retrieve(
                asset_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
                content_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
            )

            print(optimization)
        - label: TypeScript
          lang: TypeScript
          source: >-
            import Profound from '@profoundai/client';


            const client = new Profound({
              apiKey: process.env['PROFOUND_API_KEY'], // defaults to the PROFOUND_API_KEY env var
              environment: 'production',
            });


            const optimization = await
            client.content.optimization.retrieve('7c9e6679-7425-40de-944b-e07fc1f90ae7',
            {
              asset_id: '7c9e6679-7425-40de-944b-e07fc1f90ae7',
            });


            console.log(optimization);
        - label: rust
          lang: rust
          source: |-
            use profound::*;

            #[tokio::main]
            async fn main() -> Result<(), Box<dyn std::error::Error>> {
                let client = ProfoundClient::builder()
                    .api_key(std::env::var("PROFOUND_API_KEY")?)
                    .build()?;

                let response = client
                    .content()
                    .optimization()
                    .retrieve(
                        "7c9e6679-7425-40de-944b-e07fc1f90ae7",
                        "7c9e6679-7425-40de-944b-e07fc1f90ae7",
                    )
                    .send()
                    .await?;

                println!("{:?}", response);

                Ok(())
            }
components:
  schemas:
    ContentOptimizationAnalysisResponse:
      properties:
        data:
          $ref: '#/components/schemas/ContentAnalysis'
      type: object
      required:
        - data
      title: ContentOptimizationAnalysisResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ContentAnalysis:
      properties:
        content:
          $ref: '#/components/schemas/DocumentContent'
        aeo_content_score:
          anyOf:
            - $ref: '#/components/schemas/AEOScore'
            - type: 'null'
        analysis:
          $ref: '#/components/schemas/AnalysisSummary'
        recommendations:
          items:
            $ref: '#/components/schemas/Recommendation'
          type: array
          title: Recommendations
        inputs:
          $ref: '#/components/schemas/AnalysisInputs'
      type: object
      required:
        - content
        - aeo_content_score
        - analysis
        - recommendations
        - inputs
      title: ContentAnalysis
    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
    DocumentContent:
      properties:
        format:
          $ref: '#/components/schemas/ContentFormat'
        value:
          type: string
          title: Value
      type: object
      required:
        - format
        - value
      title: DocumentContent
    AEOScore:
      properties:
        target_zone:
          $ref: '#/components/schemas/AEOScoreTargetZone'
        value:
          type: number
          title: Value
      type: object
      required:
        - target_zone
        - value
      title: AEOScore
    AnalysisSummary:
      properties:
        breakdown:
          items:
            $ref: '#/components/schemas/AnalysisBreakdown'
          type: array
          title: Breakdown
      type: object
      required:
        - breakdown
      title: AnalysisSummary
    Recommendation:
      properties:
        title:
          type: string
          title: Title
        status:
          $ref: '#/components/schemas/RecommendationStatus'
        impact:
          anyOf:
            - $ref: '#/components/schemas/RecommendationImpact'
            - type: 'null'
        suggestion:
          $ref: '#/components/schemas/RecommendationSuggestion'
      type: object
      required:
        - title
        - status
        - impact
        - suggestion
      title: Recommendation
    AnalysisInputs:
      properties:
        topic:
          anyOf:
            - $ref: '#/components/schemas/TopicInput'
            - type: 'null'
        prompt:
          anyOf:
            - $ref: '#/components/schemas/PromptInput'
            - type: 'null'
        top_citations:
          items:
            type: string
          type: array
          title: Top Citations
        user:
          $ref: '#/components/schemas/UserInput'
      type: object
      required:
        - topic
        - prompt
        - top_citations
        - user
      title: AnalysisInputs
    ContentFormat:
      type: string
      enum:
        - markdown
        - html
      title: ContentFormat
    AEOScoreTargetZone:
      properties:
        low:
          type: number
          title: Low
        high:
          type: number
          title: High
      type: object
      required:
        - low
        - high
      title: AEOScoreTargetZone
    AnalysisBreakdown:
      properties:
        title:
          type: string
          title: Title
        weight:
          type: number
          title: Weight
        score:
          type: number
          title: Score
      type: object
      required:
        - title
        - weight
        - score
      title: AnalysisBreakdown
    RecommendationStatus:
      type: string
      enum:
        - done
        - pending
      title: RecommendationStatus
    RecommendationImpact:
      properties:
        section:
          type: string
          title: Section
        score:
          type: number
          title: Score
      type: object
      required:
        - section
        - score
      title: RecommendationImpact
    RecommendationSuggestion:
      properties:
        text:
          type: string
          title: Text
        rationale:
          type: string
          title: Rationale
      type: object
      required:
        - text
        - rationale
      title: RecommendationSuggestion
    TopicInput:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - name
      title: TopicInput
    PromptInput:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - name
      title: PromptInput
    UserInput:
      properties:
        type:
          $ref: '#/components/schemas/ContentType'
        value:
          type: string
          title: Value
        metadata:
          additionalProperties:
            anyOf:
              - type: integer
              - type: string
          type: object
          title: Metadata
      type: object
      required:
        - type
        - value
        - metadata
      title: UserInput
    ContentType:
      type: string
      enum:
        - file
        - text
        - url
      title: ContentType
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````