Skip to content

AI.toMarkdown() model used & dashboard improvements #240

@Mael-Abgrall

Description

@Mael-Abgrall

Hey folks

I'm using the toMarkdown() to convert PDFs, and I noticed there were tokens in the output, and that on the AI dashboard I had some usage.

In the result from the API, would it be possible to indicate which model has been used to convert to markdown (so that I can track the token usage and price in my analytic suite)

{
  "name": "somatosensory.pdf",
  "mimeType": "application/pdf",
  "format": "markdown",
  "tokens": 926,
  "data": "...",
  "model": "@cf/meta/llama-3.2-1b-instruct" // Good
  "tokens_price": 0.027 // even better
},

cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions