files-api.md

Created about 20 hours ago

attributes
source_urlhttps://github.com/anthropics/skills/blob/6e83444ffacecd38b93d1be8381967de84a427f6/skills/claude-api/php/claude-api/files-api.md

Files API - PHP

Files API

Out of beta. In current SDKs $client->beta->files` has breaking shape changes from previous versions, matching the stable `$client->files - migrate per the Files API row in shared/live-sources.md. Example below predates this.

$file = $client->beta->files->upload(
    file: fopen('upload_me.txt', 'r'),
    betas: ['files-api-2025-04-14'],
);
// Reference $file->id as a file content block on ->beta->messages->create().

Like how this is organised?

Build your own Memory tree on knowen.md: notes, decisions and tasks in one connected markdown graph, shared with your team and your AI agents.