AI on demand: MinerU: Difference between revisions

From MediaWiki
Jump to navigation Jump to search
 
Line 16: Line 16:
     ],
     ],
     "max_tokens": 2000
     "max_tokens": 2000
   }' | jq .
   }' \
  | jq .
</syntaxhighlight>
</syntaxhighlight>



Latest revision as of 14:53, 30 March 2026

Calling the model

# Set your personal key
STONEY_KEY=sk-...

# Set the desired model
MODEL_ID=MinerU2.5-2509-1.2B

curl -s https://llm.stoney-cloud.com/v1/chat/completions \
  -H "Authorization: Bearer $STONEY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "'"$MODEL_ID"'",
    "messages": [
      {"role": "user", "content": "Describe an imaginary document."}
    ],
    "max_tokens": 2000
  }' \
  | jq .

Example output:

{
  "id": "chatcmpl-8e804087bd0f6e64",
  "object": "chat.completion",
  "created": 1774862972,
  "model": "MinerU2.5-2509-1.2B",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Describe an imaginary document.",
        "refusal": null,
        "annotations": null,
        "audio": null,
        "function_call": null,
        "tool_calls": [],
        "reasoning": null,
        "reasoning_content": null
      },
      "logprobs": null,
      "finish_reason": "stop",
      "stop_reason": null,
      "token_ids": null
    }
  ],
  "service_tier": null,
  "system_fingerprint": null,
  "usage": {
    "prompt_tokens": 24,
    "total_tokens": 30,
    "completion_tokens": 6,
    "prompt_tokens_details": null
  },
  "prompt_logprobs": null,
  "prompt_token_ids": null,
  "kv_transfer_params": null
}