Skip to main content
This guide walks you through the fastest path to a working Pioneer integration. By the end, you’ll have made a successful inference call and understand the shape of the API. All you need is a Pioneer account and a terminal.
1

Sign up and get your API key

Create a free account at pioneer.ai. The free tier includes $75 of usage with no credit card required.Once you’re signed in, go to Settings → API Keys and generate a new key. Copy it somewhere safe — you won’t be able to view it again after closing the dialog.
Keep your API key out of version control. Use an environment variable or a secrets manager rather than hardcoding it in your source files.
Set your key as an environment variable so the examples below work as-is:
export PIONEER_API_KEY="your_api_key_here"
2

List available base models

Before running inference, you can browse the models Pioneer has available. Use GET /base-models to see the full catalog. Pass ?supports_inference=true to filter to models you can call immediately, or ?task_type=decoder to see LLMs only.
curl https://api.pioneer.ai/base-models?supports_inference=true \
  -H "X-API-Key: $PIONEER_API_KEY"
The response lists model IDs you can pass directly to /inference. For example, fastino/gliner2-base-v1 is the GLiNER base model for NER tasks.
3

Run your first inference call

Call POST /inference with a model ID, some text, and a schema that defines what you want to extract. The example below uses the GLiNER base model to extract named entities from a sentence.
curl -X POST https://api.pioneer.ai/inference \
  -H "X-API-Key: $PIONEER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model_id": "fastino/gliner2-base-v1",
    "text": "Apple announced the MacBook Pro at WWDC in Cupertino.",
    "schema": {
      "entities": ["organization", "product", "event", "location"]
    },
    "threshold": 0.5
  }'
The schema field tells the model what to look for. For encoder models (GLiNER), you can supply:
  • entities — a list of entity type strings for NER
  • classifications — a list of {task, labels} objects for text classification
  • structures — a dict of structure definitions for JSON extraction
  • relations — a list of relation definitions
For decoder models (LLMs), pass "task": "generate" instead of a schema.
The model_id can be a base model ID like fastino/gliner2-base-v1, or the ID of a completed training job. Once you’ve fine-tuned a model, replace the base model ID with your job ID to serve predictions from your custom model.
4

Use OpenAI or Anthropic-compatible endpoints (optional)

If you’re already using the OpenAI or Anthropic SDK, Pioneer provides drop-in compatible endpoints. Point your SDK at https://api.pioneer.ai/v1 and use your Pioneer API key — no other changes needed.
curl -X POST https://api.pioneer.ai/v1/chat/completions \
  -H "X-API-Key: $PIONEER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "fastino/gliner2-base-v1",
    "messages": [
      {"role": "user", "content": "Extract entities from: Apple launched the iPhone in San Francisco."}
    ],
    "schema": {"entities": ["organization", "product", "location"]}
  }'
Pass Pioneer-specific fields like schema via extra_body when using the OpenAI Python SDK.
5

Start a training job (optional)

When you’re ready to fine-tune on your own data, start a training job. You’ll need a dataset already uploaded or created — see Datasets for how to create one.
curl -X POST https://api.pioneer.ai/felix/training-jobs \
  -H "X-API-Key: $PIONEER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model_name": "my-ner-model",
    "base_model": "fastino/gliner2-base-v1",
    "datasets": [{"name": "my-dataset"}],
    "training_type": "lora",
    "nr_epochs": 5,
    "learning_rate": 5e-5
  }'
The response includes a job id. Poll GET /felix/training-jobs/{id} to check status. Once the job reaches complete, use the job ID as your model_id in /inference calls.Job status values: requestedrunningcomplete (or failed / stopped).

Next steps

Fine-tune an NER model

End-to-end walkthrough: dataset upload, training, evaluation, and inference.

Fine-tune an LLM

Fine-tune Qwen, Llama, or DeepSeek on your domain data with LoRA.

Synthetic data

Generate labeled training data without manual annotation.

API reference

Full reference for every endpoint with request and response schemas.