Skip to content
HomeModels
DocsGuides

Quickstart

Make your first API request in minutes.

All you need is an API key and a base URL. For applications using the OpenAI SDK, replace base_url and api_key to get started.

Sign in to the console and create a key on the API Keys page. Check your account balance and key spending limit, then save the key as an environment variable.

Create an API key
export LINKINFRA_API_KEY="sk-your-api-key"

For HTTP requests, append the endpoint path to the API root. With the OpenAI SDK, base_url must end in /v1.

OpenAI SDK Base URLhttps://api.linkinfra.ai/v1

Choose an available model ID from the model catalog, replace model in the example below, and run the request.

curl --request POST 'https://api.linkinfra.ai/v1/chat/completions' \
  --header "Authorization: Bearer $LINKINFRA_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "gpt-4o-mini",
  "messages": [
    {
      "role": "system",
      "content": "You are a helpful assistant."
    },
    {
      "role": "user",
      "content": "Hello! Tell me about yourself."
    }
  ],
  "stream": false
}'

On success, read the reply from choices[0].message.content and view usage logs in the console.