Sign inSign up

pig4cloud/markitdown

By pig4cloud

•Updated over 1 year ago

microsoft,markitdown api server Python tool for converting files and office documents to Markdown.

Image
API management
0

10K+

pig4cloud/markitdown repository overview

⁠markitdown api server

microsoft markitdown api server

⁠Environment Variables

The service supports the following environment variables:

VariableDescription
API_KEYOpenAI API Key
BASE_URLOpenAI API Base URL
MODELModel name
DELETE_DELAYFile deletion delay (seconds)
PROMPTText extraction prompt
⁠Model Configuration
⁠OpenAI GPT-4V

⁠Docker Usage

⁠1. Quick Start
docker run -p 8000:8000 pig4cloud/markitdown
⁠2. Custom LLM Configuration
docker run -d \
  -p 8000:8000 \
  -e API_KEY=your_openai_api_key \
  -e MODEL=gpt-4o \
  -e BASE_URL=https://api.openai.com/v1 \
  pig4cloud/markitdown

⁠API Documentation

⁠Upload and Extract Text

Endpoint: POST /upload/

Request Format: multipart/form-data

Parameters:

  • file: Image file

Response Example:

{
    "new_filename": "1679012345.jpg",
    "content": "extracted text content"
}

⁠Important Notes

  1. Make sure you have a valid OpenAI API key with GPT-4V access
  2. The service requires internet connectivity to access OpenAI's API
  3. Uploaded files are automatically deleted after processing (default: 10 minutes)
  4. The service listens on port 8000 by default
  5. GPT-4V has a maximum input image size limit, ensure your images meet OpenAI's requirements

⁠System Requirements

  • Docker
  • Internet connection
  • Valid OpenAI API key with GPT-4V access

⁠Features

  • High-accuracy text extraction using GPT-4V
  • Support for various image formats
  • Automatic file cleanup
  • Simple REST API interface
  • Docker-based deployment

⁠Limitations

  • Depends on OpenAI API availability
  • Subject to OpenAI's rate limits and pricing
  • Maximum image size limitations apply
  • Internet connection required

Tag summary

Content type

Image

Digest

sha256:c4fbfab25…

Size

2.1 GB

Last updated

over 1 year ago

docker pull pig4cloud/markitdown