blaschkeSign up
View Markdown

SDK integrations

Use an official OpenAI SDK or the Vercel AI SDK with your base URL, API key, and chosen model.

Choose your SDK.

Export your API key and model ID. Each example uses the documented base URL unless you set BLASCHKE_BASE_URL, and includes its installation command.

Install

python -m pip install openai

Send a request

main.py
from openai import OpenAI
import os

client = OpenAI(
    base_url=os.environ.get("BLASCHKE_BASE_URL", "https://beta.blaschkelabs.com/v1"),
    api_key=os.environ["BLASCHKE_API_KEY"],
    max_retries=0,
)

response = client.chat.completions.create(
    model=os.environ["BLASCHKE_MODEL"],
    messages=[{"role": "user", "content": "Summarize Blaschke in one sentence."}],
    max_tokens=256,
)

print(response.model)
print(response.choices[0].message.content)
print(response.usage)

The base URL includes /v1. The OpenAI examples disable automatic retries; the Vercel AI SDK follows its own retry policy.

Know what your SDK handles.

SDKs do not add unsupported API features. Your application remains responsible for tool execution, tracing, and permissions.

  • Use the model’s max_output_tokens metadata as its output cap.
  • Request usage explicitly when streaming.
  • Provide callbacks only for tools your application allows.
  • Check model support before using reasoning, images, or parallel tools.