API integration with ChatGPT


Buenas tardes. Eso lo he puesto varias veces y me da error .

Just read the error :slight_smile:
You have to give an URL to a privacy page.

1 Like

Fair enough. And those can use the exsiting API already, if it’s really necessary.

Craming LLM in everything without respect to the environmental and societal costs isn’t either.

Until now I used ChatGPT exactly once. I asked wether the use of AI makes sense with regard to the huge energy consumption. I admit I had hoped that it would answer ‘no’.
Instead it said that AI could help with the climate crisis if it’d be used responsibly. Do you feel that’s the case?

So, like “not everyone has time to read a book”, I don’t want to spend my time researching the cost/benefit-factor of every single use of LLM - instead, I “blindly oppose it”, because in almost every case LLM aren’t necessary and therefore the costs are way to high.
Likewise, I’m not going to discuss this here further, because we’re not going to reach a conclusion. You have your point of view, I have mine.

2 Likes

I’m somewhere in the middle which is probably under the same umbrella as “responsibly using it”.
AI is good and much faster then we humans to analyse huge chunks of data and finding correlations that we as humans may not even think of investigating. That’s where I would embrace it because AI can bring things to our attention that we are missing because they are buried to deep.
Using it to make a personal training plan that I would blindly follow? Nope, not for me. After all, it analyses my data and compares the results to what it found (or ‘thinks’ to have found) in a huge pile of data. Thus making assumptions that I will react similarly to those in that huge pile.
Investigating unexpected correlations found by the system? Yeah, sure. And then feeding that again as data. That sounds way more thrilling and can bring new insights.

4 Likes

Hi @Jonasdlm I keep getting a (from GPT):

“I couldn’t access your events — the system returned “Access denied.” You may need to check your permissions or log in again before I can retrieve them.”

What is it I have not understood? :slight_smile:

Did added your API key in base64 string and your athlete ID?

@Jonasdlm

I think so. I ran this in terminal:

curl -v -u API_KEY:YOUR_REAL_KEY \
  "https://intervals.icu/api/v1/athlete/0/events?oldest=2025-01-01" \
  2>&1 | grep -i "Authorization:"

I got:
Basic QV...... (but it didn’t end with == like I’ve seen suggested elsewhere).

That value is what I’ve added to the authentication settings in the ChatGPT action.

Also, the following has been added to the schema (same as suggested above):

openapi: 3.1.0
info:
  title: Intervals.icu Workouts and Events
  version: 1.1.4
  description: >-
    Interact with planned workouts (events) on Intervals.icu. Authenticate with HTTP
    Basic: username is the literal text API_KEY, password is your personal key from
    Settings → API.
servers:
  - url: https://intervals.icu/api/v1
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
  schemas:
    Step:
      type: object
      required: [duration, zone]
      properties:
        duration:
          type: string
        zone:
          type: string
        cadence:
          type: string
        description:
          type: string
    Event:
      type: object
      required: [start_date_local, category, type, name]
      properties:
        id:
          type: integer
          format: int32
        start_date_local:
          type: string
          format: date-time
        category:
          type: string
          enum: [WORKOUT, RACE_A, RACE_B, RACE_C, NOTE]
        type:
          type: string
        name:
          type: string
        description:
          type: string
        planned_duration:
          type: integer
        distance:
          type: number
        target:
          type: string
          enum: [AUTO, POWER, HR, PACE]
        indoor:
          type: boolean
        hide_from_athlete:
          type: boolean
        athlete_cannot_edit:
          type: boolean
        steps:
          type: array
          items:
            $ref: '#/components/schemas/Step'
    EventsBulkRequest:
      type: object
      required: [events]
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/Event'
paths:
  /athlete/{athleteId}/events:
    get:
      operationId: listEvents
      summary: List athlete events
      security:
        - basicAuth: []
      parameters:
        - name: athleteId
          in: path
          required: true
          schema:
            type: string
        - name: oldest
          in: query
          schema:
            type: string
        - name: newest
          in: query
          schema:
            type: string
        - name: category
          in: query
          schema:
            type: string
        - name: limit
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Event'
        '401':
          description: Unauthorized
    post:
      operationId: createEvent
      summary: Create one event
      security:
        - basicAuth: []
      parameters:
        - name: athleteId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Event'
      responses:
        '201':
          description: Created
        '400':
          description: Bad request
        '401':
          description: Unauthorized
  /athlete/{athleteId}/events/{eventId}:
    get:
      operationId: getEvent
      summary: Get a single event
      security:
        - basicAuth: []
      parameters:
        - name: athleteId
          in: path
          required: true
          schema:
            type: string
        - name: eventId
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Event'
        '401':
          description: Unauthorized
        '404':
          description: Not found
  /athlete/{athleteId}/events/bulk:
    post:
      operationId: createEventsBulk
      summary: Create multiple events
      security:
        - basicAuth: []
      parameters:
        - name: athleteId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventsBulkRequest'
      responses:
        '200':
          description: OK
        '400':
          description: Bad request
        '401':
          description: Unauthorized

And where will you go if you leave Intervals? Do you feel you have a personal veto over implementing what is clearly an in-demand feature?

From my perspective, I have zero interest in linking intervals.icu to ChatGPT. On the other hand, I don’t particularly want to stop others doing linking their data to ChatGPT - so as longs as it’s opt-in, I’d be OK. But what I don’t want are AI bots running through my data on intervals.icu. Maybe I’m paranoid.

3 Likes

And where will you go if you leave Intervals?

Don’t know yet, maybe Golden Cheetah.

Do you feel you have a personal veto over implementing what is clearly an in-demand feature?

No, of course not.
(And I really don’t know where you could possibly see a hint for this ridiculous idea in my posts.)

But I hope we can agree that I - like everybody else - have the personal freedom to express my personal thoughts on a topic and to stop using a service out of personal reasons.

2 Likes

Buenas tardes. No se como hacer. He intentado y no hay manera

I’ve tried using this, but I get error:

Error talking to connector

The connection attempt is still being blocked with a 403 Access Denied error, even after retrying.

I’ve tried providing my Athelete ID. It also says about making sure i have enabled ‘Allow third party access’ - I cannot see this option anywhere.

1 Like

I get a similar response. Have you found a solution?

Thanks is there a way you could share detailed steps how you did? Blog post, video tutorial, or just bullet points as I’d like to do the same. Right now I’m using ChatGPT and I’ve given prompts to store some of my info in memory, and then it guides me to plan macro/meso cycle. Then I use Stryd to construct my plan for a given objective (I’m running on road and trails). If there would be GPT to Intervals interaction possible that would be interesting.

I’m also using GPT to analyze athlete results from public web site (Betrail, ITRA) and give me recommendations for my own long term planning and load to follow.

Hi, we are just about to launch our ChatGPT builder that can allow you to easily get a plan into Intervals without having to know anything about programming. We do apply some of our rules (but as we get feedback we can modify that). What’s funny is I just happened to see your post here so I thought I would share it with you. If you give me feedback I have no problem giving you a month for of our pro version for you to test it out. Just signup and give me your email. It’s currently not launched but will be in the next few days. You can watch a video to see how simple it is

7 Likes

Some coding background is needed and basic understanding of how node projects work and how they are setup. I used claude code, which is a command line interface tool for the claude LLM as a coding agent. I don’t think there is a free tier for that, the pro costs 20$/month. What I basically did (the editor and the claude code was already setup) is that I prompted untill I had an intergration in intervals.icu. It can fetch my wellness data (which you can download as a csv file and upload to any AI chat by the way), activity data and upload workouts. All written in typescript.

If you are not aware, I am the one that inspired David with Claude Code… pretty amazing right? I love it.

2 Likes

Yes AI agents can be really helpfull, especially with small personal apps that isn’t ment for public use and the code quality is not so important :slight_smile: They really lower the bar for creating little helper apps.

Yes for sure. Trying to get CC to do complicated tasks is very difficult, he wants to fight and kick.

Buenos dias . Yo he conseguido que Claude me lea mi estado de salud de intervals, pero no he podido hacer para que pueda escribir y mandar entrenamiento o planes .