Docs
cortecs.aiDedicated ModelsServerless ModelsLogin
  • Introduction
  • DEDICATED INFERENCE
    • Quickstart
    • Provisioning API
      • Authentication
      • User
      • Instances
      • Models
      • Hardware Types
    • Python client
      • Objects
      • Langchain integration
    • Examples
      • Batch jobs
      • Realtime streams
  • SERVERLESS INFERENCE
    • Quickstart
    • About Serverless Routing
    • API
      • Chat Completions
      • Models
  • Discord
Powered by GitBook
On this page
  • 1. Register
  • 2. Choose a Model
  • 3. Obtain Your Access Token
  • 4. Send Your Requests
  1. SERVERLESS INFERENCE

Quickstart

Introducing Serverless LLM Routing

PreviousRealtime streamsNextAbout Serverless Routing

Last updated 11 days ago

1. Register

Register at and follow these steps to set up your account:

  • Fill out your billing address in the and press Save.

  • Enter your credit card details.

  • Increase your account balance. Press Top up to increase your account balance.

If your balance reaches zero, your requests will fail. To avoid this, use Auto top-up to set an amount that is automatically transferred when your balance falls below a specified threshold.

2. Choose a Model

3. Obtain Your Access Token

curl -X POST \
     'http://cortecs.ai/api/v1/oauth2/token' \
     -H 'Content-Type: application/json' \
     -d '{"client_id": "<CLIENT_ID>",
          "client_secret": "<CLIENT_SECRET>",
          "grant_type": "client_credentials"}'

4. Send Your Requests

You are ready to send your requests using an OpenAI-compatible interface. Note that your provisioning preference is passed as additional parementer.

curl 'http://cortecs.ai/api/v1/models/serverless/chat/completions' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer <ACCESS_TOKEN>' \
    -d '{
      "model": "<MODEL_NAME>",
      "messages": [
        { "role": "system", "content": "You are a funny assistant" },
        { "role": "user", "content": "Tell me a joke" }
      ],
      "max_tokens": 100,
      "preference": "speed"
    }'

Select a model from our . To help you choose and test models, you can click on the Chat button at the bottom of the Detailed View of the chosen model.

Go to your . There you can find your Client id and generate your Client secret. You can obtain your access token by sending the following curl request:

catalog
profile page
cortecs.ai
profile page
Profile page after successfully adding 100€ to the account balance