Gridline

v0.1.7
io.github.GridlineGPU/mcp Checked 2 days ago Published 5 days ago

Post-train open models (fine-tuning, RL, distillation), evaluate and batch them on Gridline.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_models List models

List the base models you can batch or fine-tune on, and your own ft: models. Free: no charge.

get_credit_balance Credit balance

Your credit balance and low-credit threshold (Gridline's usage summary), plus your most recent charges. Free: no charge.

ParameterTypeDescription
limitintegerPage size, 1 to 100.

upload_file Upload a file

Upload a local JSONL file to the Files API. purpose "fine-tune" for training/validation data (OpenAI chat format; DPO preference rows for DPO), "batch" for a batch input file (one request per line). At most 200 MB. Returns the file object; use its id in create_fine_tune, create_batch or an eval run. Free: no charge. Stored files count toward your storage limits.

ParameterTypeDescription
path *stringLocal path of the JSONL file to upload.
purpose *string"fine-tune" or "batch".

create_fine_tune Create a fine-tuning job

Start a fine-tuning job (OpenAI's /fine_tuning/jobs shape) that trains a LoRA or QLoRA adapter on an open base model and names the result with an ft: id, or quote it with dry_run: true. method: "lora" or "qlora" as a string, or OpenAI's {"type": "supervised", "supervised": {"adapter": "lora", "hyperparameters": {...}}} or {"type": "dpo", "dpo": {"hyperparameters": {"beta": ...}}}. Hyperparameters (n_epochs, batch_size, learning_rate_multiplier, lora_rank, lora_alpha, max_seq_length) go in hyperparameters or inside method, once. Costs credit: a fine-tune is charged per 1M trained tokens (traini…

ParameterTypeDescription
model *stringBase model id, e.g. qwen3.5-9b (see list_models).
training_file *stringFile id of the training data (purpose fine-tune).
confirm_spendbooleanMust be true for this call to run: you have read the quote or price and accept the charge.
dry_runbooleantrue: return the quote and the credit check only; nothing is created or charged.
hyperparametersobjectTraining settings.
metadataobject
method"lora", "qlora", or an OpenAI method object (supervised or dpo).
seedinteger
suffixstringA short label in the ft: model name.
validation_filestringOptional validation file id.

list_fine_tunes List fine-tuning jobs

List your fine-tuning jobs, newest first. Free: no charge.

ParameterTypeDescription
afterstringCursor: the last id of the previous page.
limitintegerPage size, 1 to 100.

get_fine_tune Get a fine-tuning job

A fine-tuning job's status, its quote and, once it succeeds, its ft: model. Free: no charge.

ParameterTypeDescription
id *stringFine-tuning job id (ftjob-...).

list_fine_tune_events Fine-tuning job events

A fine-tuning job's events: progress, training and validation loss, warnings and errors. Free: no charge.

ParameterTypeDescription
id *stringFine-tuning job id.
afterstringCursor: the last id of the previous page.
limitintegerPage size, 1 to 100.

cancel_fine_tune Cancel a fine-tuning job

Cancel a fine-tuning job. It stops the job; read the job afterwards (get_fine_tune) for its final state and charge. Free: no charge.

ParameterTypeDescription
id *stringFine-tuning job id.

create_batch Create a batch

Run a batch (OpenAI's /batches shape) over an uploaded batch file on a base model or your ft: model. endpoint: "/v1/chat/completions" (default) or "/v1/embeddings". completion_window: "24h" (default) or Gridline's looser "72h". Costs credit: a batch is charged per 1M input and output tokens at the model's published batch price, and at least the model's per-batch minimum (https://gridlinegpu.com/pricing). A batch whose upper bound your credit cannot cover is refused before it runs. Requires confirm_spend: true.

ParameterTypeDescription
input_file_id *stringFile id of the batch input (purpose batch).
completion_windowstringDefault "24h".
confirm_spendbooleanMust be true for this call to run: you have read the quote or price and accept the charge.
endpointstringDefault "/v1/chat/completions".
metadataobject

get_batch Get a batch

A batch's status, request counts, cost and its output/error file ids. Free: no charge.

ParameterTypeDescription
id *stringBatch id (batch_...).

cancel_batch Cancel a batch

Cancel a batch. A cancelled batch still delivers, and charges for, the requests that completed; the rest are not run. Free: no charge.

ParameterTypeDescription
id *stringBatch id.

download_results Download batch results

Save a batch's output (or error) file to a local path. Give batch_id (which: "output" or "error") or a file_id. Free: no charge.

ParameterTypeDescription
output_path *stringLocal path to write the JSONL to.
batch_idstringBatch id.
file_idstringA file id to download instead of a batch's.
whichstringDefault "output".

create_eval Create an eval

Define an eval (OpenAI's Evals API): data_source_config (the item schema) and testing_criteria (graders: string_check, text_similarity, score_model). Defining it is free; runs cost credit (see create_eval_run).

ParameterTypeDescription
data_source_config *objectOpenAI data_source_config.
testing_criteria *arrayGraders, OpenAI's shape.
metadataobject
namestring

create_eval_run Run an eval

Run an eval over a data source: a file of items, or completions sampled from a model (a base model or your ft: model, to compare them). Costs credit unless dry_run is true: an eval run is billed as ordinary batches at published batch prices, each at least its model's per-batch minimum (https://gridlinegpu.com/pricing). A run that only uses string_check and text_similarity on a file's own answers creates no batch and costs nothing. Send dry_run: true first to get the quote. Requires confirm_spend: true unless dry_run is true.

ParameterTypeDescription
data_source *objectOpenAI eval run data_source.
eval_id *stringEval id (eval_...).
confirm_spendbooleanMust be true for this call to run: you have read the quote or price and accept the charge.
dry_runbooleantrue: return the quote only; nothing runs.
metadataobject
namestring

get_eval_run Get an eval run

An eval run's status, per-grader results, cost and its results file. Free: no charge.

ParameterTypeDescription
eval_id *stringEval id.
run_id *stringRun id (evalrun_...).

list_output_items Eval run output items

An eval run's graded items: each sample and every grader's result. Free: no charge.

ParameterTypeDescription
eval_id *stringEval id.
run_id *stringRun id.
afterstringCursor: the last id of the previous page.
limitintegerPage size, 1 to 100.

create_distillation Create a distillation job

Run one-call distillation (Gridline's /distillation/jobs): the teacher model answers your prompts in a batch, the answers become a fine-tuning file with held-out rows, the student base is fine-tuned on it, and (unless run_student_batch is false) the new ft: model answers the held-out prompts so you can compare it with the teacher. Give your prompts as prompts_file (a file id from upload_file, purpose "batch") or prompts (a local JSONL path this tool uploads first), not both; one prompt a line: {"messages": [...]} ending with the user's turn, or an OpenAI batch request line. Prompt baking: stud…

ParameterTypeDescription
student *stringStudent base model id (a fine-tune base).
teacher *stringTeacher model id: any chat model list_models shows for you.
confirm_spendbooleanMust be true for this call to run: you have read the quote or price and accept the charge.
dry_runbooleantrue: return the quote only; no job is created and nothing is charged (a local prompts file is still uploaded, free).
keep_truncatedbooleanKeep teacher answers cut at max_tokens in the training file (default false: they are left out, still billed).
lora_rankintegerLoRA rank.
max_tokensintegerTeacher answer limit (default 1,024 or the teacher's own limit).
metadataobject
methodstring"lora" or "qlora".
n_epochsintegerFine-tuning epochs (default: the student's).
promptsstringLocal path of a prompts JSONL to upload instead of prompts_file.
prompts_filestringFile id of the prompts (purpose batch, from upload_file).
run_student_batchbooleanRun the ft: model on the held-out prompts (default true).
spend_cap_usdnumberRefuse the job if the quote's max_total_usd is over this.
student_systemPrompt baking. Omit or null: the student trains on the prompt as the teacher saw it. "": no system message. Text: this short system message instead of yours.
temperaturenumberTeacher temperature, 0 to 2.
validation_splitnumberShare of prompts held out, 0 up to 1 (default 0.1).

list_distillations List distillation jobs

List your distillation jobs, newest first. Free: no charge.

ParameterTypeDescription
afterstringCursor: the last id of the previous page.
limitintegerPage size, 1 to 100.

get_distillation Get a distillation job

A distillation job's status and stage, its stages' batch and fine-tune ids, costs, and the ft: model once it succeeds. Free: no charge.

ParameterTypeDescription
id *stringDistillation job id (distjob-...).

list_distillation_events Distillation job events

A distillation job's stage events (transitions, newest first). Free: no charge.

ParameterTypeDescription
id *stringDistillation job id (distjob-...).
afterstringCursor: the last id of the previous page.
limitintegerPage size, 1 to 100.

cancel_distillation Cancel a distillation job

Cancel a distillation job; its current stage (a batch or fine-tune) is cancelled too. Stages already billed stay billed: read the job afterwards (get_distillation) for its final state and costs. Free: no charge.

ParameterTypeDescription
id *stringDistillation job id (distjob-...).

request_merged_weights Export merged weights

Ask for an ft: model merged into its base as full safetensors. Free: the merge and download are at no charge; the export is kept 7 days. Poll get_merged_weights until it succeeds.

ParameterTypeDescription
model *stringYour ft: model id.

get_merged_weights Merged weights status

A merged-weights export's status and its file list. Free: no charge.

ParameterTypeDescription
model *stringYour ft: model id.

get_merged_file_url Merged weights download URL

A short-lived (15 minute) download URL for one file of a merged-weights export. Download it with any HTTP client; the bytes are not passed through this tool. Free: no charge.

ParameterTypeDescription
model *stringYour ft: model id.
path *stringFile path from get_merged_weights.

login Log in

Log in to Gridline through the user's browser when no API key is set (a tool answered not_logged_in). The first call starts the login and returns verification_url and user_code: show both to the user and ask them to open the URL, sign in or sign up, check the code matches and click Approve. Call login again to wait for the approval (up to wait_seconds); it answers logged_in once the key is saved. The key is stored privately on this machine (the same file `gridline login` uses) and is never shown. Free: no charge.

ParameterTypeDescription
forcebooleanApprove a new API key even if one is already set.
wait_secondsintegerHow long a call after the first waits for the approval, 0 to 120 (default 30).

signup Create a Gridline account

Create a Gridline account and API key for the user with no browser. Before calling it, show the user the terms of use, the job terms and the privacy policy (call with accept_terms false to get their links) and get their yes: accept_terms true accepts them on the user's behalf. The key is saved privately on this machine (the file gridline login uses) and never shown. Free. For an existing account use login instead.

ParameterTypeDescription
accept_terms *booleanTrue only after the user read the terms and said yes.
email *stringThe user's email address.
namestringThe user's name (optional).

email_login Log in with an emailed code

Get an API key for an existing Gridline account with no browser, or renew an expiring one. Call with email only to email the user a 6-digit code; get it from their inbox if you can read it, or ask the user, then call again with email and code. The key is saved privately on this machine and never shown. Free.

ParameterTypeDescription
email *stringThe account's email address.
codestringThe 6-digit code from the email.

verify_email Verify the account email

Verify the user's email with the 6-digit code Gridline emailed them (subject "Your Gridline code": read it from their inbox if you can, otherwise ask the user). Needed before anything else: uploads, quotes, jobs and the free credit. Pass resend true to email a new code. Free.

ParameterTypeDescription
codestringThe 6-digit code from the email.
resendbooleanEmail a new code instead.

add_credit Add credit

Get a payment link for the user to add credit (at least $5): method card gives a checkout page they pay once in their browser; method usdc gives a Solana Pay URL any wallet can pay, when USDC is open. The first payment opens a new account. Creating the link charges nothing. The job terms (see signup with accept_terms false for the link) apply to buying credit: get the user's yes first.

ParameterTypeDescription
accept_terms *booleanTrue only after the user accepted the job terms.
amount_usd *integerWhole US dollars, 5 or more.
method *stringcard (checkout link) or usdc (Solana Pay).

claim_free_credit Claim the free credit

Claim the free starter credit for a new account, while it lasts. Needs a verified email (verify_email) and the user's yes to the job terms. One claim per email address (+tag variants count as one) and per network. It opens the account. Free.

ParameterTypeDescription
accept_terms *booleanTrue only after the user accepted the job terms.

list_keys List the account's API keys

List the account's active API keys and sessions (id, name, scopes, dates), marking the one this server uses. Never shows a key's secret. Call once without code to email the user a 6-digit code, then again with the code. The same code then works for one revoke_key of another key. Free.

ParameterTypeDescription
codestringThe 6-digit code from the email.

revoke_key Revoke an API key

Revoke an API key. this_key true revokes the key this server uses and forgets it. For another key, pass its id (from list_keys) and the emailed code; with no code it emails one. Closing the account is not possible here: the user does that in the dashboard. Free.

ParameterTypeDescription
codestringThe 6-digit code from the email.
idstringAnother key's id from list_keys.
this_keybooleanTrue to revoke the key this server uses.