magnum-v4

This documentation is valid for the following list of our models:

  • anthracite-org/magnum-v4-72b

Model Overview

A LLM fine-tuned on top of Qwen2.5, specifically designed to replicate the prose quality of the Claude 3 models, particularly Sonnet and Opus. It excels in generating coherent and contextually rich text.

How to make the first API call

How to make the first API call

1 Required setup (don’t skip this)Create an account: Sign up on the AI/ML API website (if you don’t have one yet). ▪ Generate an API key: In your account dashboard, create an API key and make sure it’s enabled in the UI.

2️ Copy the code example At the bottom of this page, pick the snippet for your preferred programming language (Python / Node.js) and copy it into your project.

3️ Update the snippet for your use caseInsert your API key: replace <YOUR_AIMLAPI_KEY> with your real AI/ML API key. ▪ Select a model: set the model field to the model you want to call. ▪ Provide input: fill in the request input field(s) shown in the example (for example, messages for chat/LLM models, or other inputs for image/video/audio models).

4️ (Optional) Tune the request Depending on the model type, you can add optional parameters to control the output (e.g., generation settings, quality, length, etc.). See the API schema below for the full list.

5️ Run your code Run the updated code in your development environment. Response time depends on the model and request size, but simple requests typically return quickly.

API Schema

post
Body
modelstring · enumRequiredPossible values:
max_completion_tokensinteger · min: 1Optional

An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens.

max_tokensnumber · min: 1Optional

The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API.

streambooleanOptional

If set to True, the model response data will be streamed to the client as it is generated using server-sent events.

Default: false
temperaturenumber · max: 2Optional

What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both.

top_pnumber · min: 0.01 · max: 1Optional

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both.

seedinteger · min: 1Optional

This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result.

frequency_penaltynumber | nullableOptional

Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.

presence_penaltynumber | nullableOptional

Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.

stopany ofOptional

Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.

stringOptional
or
string[]Optional
or
any | nullableOptional
response_formatone ofOptional

An object specifying the format that the model must output.

or
or
min_pnumber · min: 0.001 · max: 0.999Optional

A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k.

top_knumberOptional

Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature.

repetition_penaltynumber | nullableOptional

A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition.

top_anumber · max: 1Optional

Alternate top sampling parameter.

Responses
200Success
post
/v1/chat/completions
200Success

Code Example

Response

Last updated

Was this helpful?