# Gridline > Gridline is the API for training your own AI models and running them in batch: fine-tuning, distillation and batch inference. Text fine-tuning and batch are live today: sign up and add credits by card to start. One API for fine-tuning, distillation and batch inference. ## Keep the client you already use Point OpenAI's Python client at Gridline and your first fine-tune is three calls away. ```python import os from openai import OpenAI client = OpenAI( base_url="https://api.gridlinegpu.com/openai/v1", api_key=os.environ["GRIDLINE_TOKEN"], ) training = client.files.create(file=open("train.jsonl", "rb"), purpose="fine-tune") job = client.fine_tuning.jobs.create(model="qwen2.5-7b-instruct", training_file=training.id) print(job.gridline["quote"]) # an estimate, before the job runs ``` ## For agents - One index: llms.txt lists every public page and the docs, with the quickstart inline. - Every page as Markdown: Add .md to a page's URL, or send Accept: text/markdown to the URL you already have. - An API it already knows: Files, fine-tuning jobs and batches follow OpenAI's API. Change the base URL and the key. - The home page's Markdown is https://gridlinegpu.com/index.md. A Markdown answer ends with the URL of the page it was made from. - The API base URL is https://api.gridlinegpu.com/openai/v1. The docs keep the token in the GRIDLINE_TOKEN environment variable; never print or commit it. - Fine-tunes are quoted before they run, and every job is paid from prepaid credits. Ask the person before creating a fine-tune or a batch. ## Pages - [Gridline](https://gridlinegpu.com/?mode=machine) - [Docs](https://gridlinegpu.com/docs) - [Pricing](https://gridlinegpu.com/pricing?mode=machine) - [Get started](https://gridlinegpu.com/signup) - [Privacy](https://gridlinegpu.com/privacy) - [Terms](https://gridlinegpu.com/terms) - [Refunds](https://gridlinegpu.com/refund) ## Docs - [Fine-tuning](https://gridlinegpu.com/docs/fine-tuning) - [Batch API](https://gridlinegpu.com/docs/batch-api) - [Distillation](https://gridlinegpu.com/docs/distillation) - [Models](https://gridlinegpu.com/docs/models) - [Migrate from OpenAI](https://gridlinegpu.com/docs/openai-migration) - [Advanced: your own script](https://gridlinegpu.com/docs/own-script) ## Optional - [llms-full.txt](https://gridlinegpu.com/llms-full.txt)