Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TokenLab Native Endpoints Examples

Public contract

Copyable examples for TokenLab native endpoint families beyond generic OpenAI-compatible chat.

Setup

cp .env.example .env
export TOKENLAB_API_KEY=sk-your-tokenlab-key
npm install
npm test

Examples

  • examples/chat-completions.mjs
  • examples/responses.mjs
  • examples/anthropic-messages.mjs
  • examples/gemini-generate-content.mjs
  • examples/list-models.mjs

Compatibility Check

npm run verify:contract checks the live OpenAPI document for Chat Completions, Responses, Anthropic Messages, Gemini generateContent, and model discovery, then verifies the example model IDs against the public catalog. GitHub Actions repeats this check daily.

GitHub Action

Use the public contract check in another repository:

steps:
  - uses: hedging8563/tokenlab-native-endpoints-examples@v1
    with:
      models: gpt-5.5,claude-sonnet-5

models is optional. It accepts comma-separated TokenLab logical model IDs and defaults to the model IDs used by this repository's examples. The OpenAPI document and public model catalog URLs are fixed by the action.

Links

About

TokenLab examples for Chat Completions, Responses, Anthropic Messages, and Gemini

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages