AI on demand: opendatalab/MinerU2.5-2509-1.2B: Difference between revisions

From MediaWiki
Jump to navigation Jump to search
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
stepping stone AG is proud to serve customers with current Language Models and OCR solutions.
== Calling the model ==
 
All of our LLM services are reachable from https://llm.stoney-cloud.com/.
 
== Calling a model ==
We assume you've received your API key from us in our usual manner. The route above is available in the usual OpenAI-compatible manner.
For instance, receiving a list of available model is done via https://llm.stoney-cloud.com/v1/models which requires you to provide your key.
As an initial service we provide access to some OCR models.
 
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# Set your personal key
# Set your personal key:
STONEY_KEY=sk-...
STONEY_KEY=sk-...


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


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


== Inspecting your usage ==
# Set maximum amount of tokens:
MAX_TOKENS=2000


<syntaxhighlight lang="bash">
curl https://llm.stoney-cloud.com/v1/chat/completions \
curl -s https://llm.stoney-cloud.com/v1/usage \
        --silent --fail --show-error \
  -H "Authorization: Bearer $STONEY_KEY" \
        --header "Authorization: Bearer $STONEY_KEY" \
  | jq .
        --header 'Content-Type: application/json' \
        --data '{
                "model": "'"$MODEL"'",
                "messages": [
                        {"role": "user", "content": "'"$PROMPT"'"}
                ],
                "max_tokens": '"$MAX_TOKENS"'
        }' \
        | jq
</syntaxhighlight>
</syntaxhighlight>


We issue one key per model for now. The usage is thus per-model-per-key.
Example output:
 
<syntaxhighlight lang="json">
{
  "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
}
</syntaxhighlight>


[[Category:AI on demand]]
[[Category:AI on demand]]

Latest revision as of 14:15, 7 May 2026

Calling the model

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

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

# Set your prompt:
PROMPT='Describe an imaginary document.'

# Set maximum amount of tokens:
MAX_TOKENS=2000

curl https://llm.stoney-cloud.com/v1/chat/completions \
        --silent --fail --show-error \
        --header "Authorization: Bearer $STONEY_KEY" \
        --header 'Content-Type: application/json' \
        --data '{
                "model": "'"$MODEL"'",
                "messages": [
                        {"role": "user", "content": "'"$PROMPT"'"}
                ],
                "max_tokens": '"$MAX_TOKENS"'
        }' \
        | 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
}