SERV_API_KEY — your prompts, tool definitions, and application logic stay the same. Or call the endpoints directly over HTTP. Generate a key at console.openserv.ai.
Make your first request
Install the SDK you already use:example.mjs file. Read the key from the SERV_API_KEY environment variable and never expose it in browser JavaScript.
usage. That completes the integration. For Python, the Vercel AI SDK, LangChain, and other clients, see SDK Migration.
Call the endpoints directly
For raw HTTP, SERV exposes three endpoints underhttps://inference-api.openserv.ai.
Things to know
A few SERV-specific behaviors are worth knowing before your first integration. Full detail is in SDK Integration.- A system prompt is required. Every request needs a
systemmessage,instructionsfield, or developer message. Requests without one are rejected. - The base URL differs by SDK. The OpenAI SDK takes
/v1in the base URL; the Anthropic SDK does not — it appends/v1/messagesitself. - The auth field differs by SDK. OpenAI uses
apiKey; the Anthropic SDK usesauthToken.
If the request fails
401: the API key is missing, revoked, or wrong. With the Anthropic SDK, passauthTokenand setapiKey: nullso an ambientANTHROPIC_API_KEYisn’t sent instead.402: the organization’s balance can’t cover the request. Add credits in the console.400: the error message names the problem, most often a missing system prompt or a model ID that isn’t in the catalog.404with the Anthropic SDK: remove/v1frombaseURL.
Try it in the Playground
Compare any model with and without SERV Reasoning side by side on the same prompt before you commit to an integration. → console.openserv.ai/playgroundNext steps
Migrating an existing codebase? The migration prompt lets an AI coding tool do the per-call-site changes for you.Models
The full model catalog with pricing and context windows.
SDK Integration
Endpoint details and the parameter map.
SDK Migration
Migrate Python, Vercel AI SDK, LangChain, and raw
fetch clients.Why SERV Reasoning
What you get over calling model APIs directly.

