docs cortecs
cortecs.aiModels
  • Getting started
    • Introduction
    • Quickstart
    • LLM Workers
  • Examples
    • Basics
    • Structured output
    • Batch jobs
    • Multi-agents
    • Realtime streams
  • cortecs-py
    • Python client
      • Objects
    • Integrations
  • API
    • Authentication
    • User
    • Instances
    • Models
    • Hardware Types
  • Discord
Powered by GitBook
On this page
  1. API

Authentication

PreviousIntegrationsNextUser

Last updated 5 months ago

Go to the Credentials section of your Profile page on cortecs.ai and create your credentials first.

Authenticate a client and retrieve an access token

post

Authenticates a client using the client credentials and returns an access token to be used for further API requests.

Body
client_idstringRequired

The client ID assigned to the client.

Example: your_client_id
client_secretstringRequired

The client secret assigned to the client.

Example: your_client_secret
grant_typestringRequired

The type of grant being used, typically "client_credentials".

Example: client_credentials
Responses
200
Successfully authenticated
application/json
400
Invalid request.
401
Unauthorized - Invalid client credentials.
500
Internal server error.
post
POST /api/v1/oauth2/token HTTP/1.1
Host: cortecs.ai
Content-Type: application/json
Accept: */*
Content-Length: 101

{
  "client_id": "your_client_id",
  "client_secret": "your_client_secret",
  "grant_type": "client_credentials"
}
{
  "access_token": "abcdef123456",
  "token_type": "Bearer",
  "expires_in": 3600
}